mirror of
https://github.com/scottlamb/moonfire-nvr.git
synced 2025-01-24 13:13:16 -05:00
7b0a489541
Fixes #206. 307a388 switched to creating a single-threaded runtime for each stream, then destroying prior to waiting for TEARDOWN on shutdown. This meant that the shutdown process could panic with this error: ``` panic at '/home/slamb/git/retina/src/client/mod.rs:219:22': teardown Sender shouldn't be dropped: RecvError(()) ``` Let's switch back to expecting a multithreaded runtime context. Create one for the config subcommand, too. Don't go all the way back to the old code with its channels, though. That had the downside that the underlying retina::Session might outlive the caller, so there could still be an active session when we start the next one. I haven't seen this cause problems in practice but it still doesn't seem right.