QuantumEntangledAndy / neolink

An RTSP bridge to Reolink IP cameras
GNU Affero General Public License v3.0
257 stars 41 forks source link

tokio panicked in v. 0.6.0 #146

Closed fmarzocca closed 10 months ago

fmarzocca commented 10 months ago

Just installed v. 0.6.0 anch launched this command:

/homeAssets/neolink battery giardino --config=/homeAssets/neolink_config.toml

Output:

[2023-09-18T07:45:40Z INFO  neolink] Neolink e5008abe5611f9f28475f904ea79f01b22f15d26 release
[2023-09-18T07:45:40Z INFO  neolink::utils] giardino: Connecting to camera at UID: 95270004YFGE16SE
[2023-09-18T07:45:40Z INFO  neolink_core::bc_protocol] giardino: Trying local discovery
[2023-09-18T07:45:42Z INFO  neolink_core::bc_protocol] giardino: Local discovery success 95270004YFGE16SE at 192.168.1.42:25289
[2023-09-18T07:45:42Z INFO  neolink::utils] giardino: Logging in
[2023-09-18T07:45:44Z INFO  neolink::utils] giardino: Connected and logged in
[2023-09-18T07:45:44Z INFO  neolink::common::camthread] giardino: Camera time is already set: 2023-09-18 9:45:44.0 -01:00:00
[2023-09-18T07:45:44Z INFO  neolink::common::neocam] giardino: Model Reolink Argus Eco
[2023-09-18T07:45:44Z INFO  neolink::common::neocam] giardino: Firmware Version v3.0.0.1605_22120901
<?xml version="1.0" encoding="utf-8"?><BatteryInfo><channelId>0</channelId><chargeStatus>chargeComplete</chargeStatus><adapterStatus>solarPanel</adapterStatus><voltage>3965</voltage><current>-184</current><temperature>27</temperature><batteryPercent>100</batteryPercent><lowPower>0</lowPower><batteryVersion>2</batteryVersion></BatteryInfo>
thread 'tokio-runtime-worker' panicked at 'A Tokio 1.x context was found, but it is being shutdown.', /github/home/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.29.1/src/runtime/time/entry.rs:557:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
QuantumEntangledAndy commented 10 months ago

Ah non graceful shutdown again. It's not easy to shutdown so many independent threads happening on several levels of abstraction. Should be a harmless error it only occurs when everything is finished. It's just saying that the main thread finished before the other threads.

QuantumEntangledAndy commented 10 months ago

Ok so I had trouble replicating this, BUT I went through all the code to find all the threads and tried to make them all close before I let the it drop them.

Build for this is here please let me know how it goes

fmarzocca commented 10 months ago

Perfect, thank you. No more panics!