Attempt some proper cleanup on shutdown

This commit is contained in:
Jono Targett 2023-05-15 15:41:20 +09:30
parent 6ddd8e844e
commit e51e25be03

View File

@ -187,6 +187,12 @@ if __name__ == '__main__':
debug=False 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...') print('Killing RTSP relay...')
rtsp_relay.kill() rtsp_relay.kill()
rtsp_relay.wait() # Necessary? rtsp_relay.wait() # Necessary?