From e51e25be03432175144b8336cb8915bf0ea9bd36 Mon Sep 17 00:00:00 2001 From: Jono Targett Date: Mon, 15 May 2023 15:41:20 +0930 Subject: [PATCH] Attempt some proper cleanup on shutdown --- microservice.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/microservice.py b/microservice.py index 7455046..8bdeeb4 100755 --- a/microservice.py +++ b/microservice.py @@ -187,6 +187,12 @@ if __name__ == '__main__': debug=False ) + print('Stopping any currently streaming radios...') + for radio in radios: + if radios[radio].is_streaming(): + radios[radio].end_stream() + radios = None + print('Killing RTSP relay...') rtsp_relay.kill() rtsp_relay.wait() # Necessary?