Open michaelweiser opened 2 years ago
Mitigated by switch to asyncio and running trackers as tasks and cancelling them on shutdown, e.g. https://github.com/michaelweiser/PeekabooAV/blob/1cfeb528facd244002238bd0a8cd17c8cf9882de/peekaboo/toolbox/cortex.py#L817 (apart from dropping startup connectivity checks altogether).
Because we needed to switch the signal handler to asyncio in 9051be993ec55335f28db05e39a22726cef647f0, retries in cuckoo and cortex connectivity checks can no longer be aborted and shutdown will only happen after the retries have been exhausted. This is likely due to the asyncio event loop not even running while the toolbox modules initialise. So we'd need to either switch them to asyncio as well or defer their startup into separate threads.