add some logging when program gets terminated

This commit is contained in:
jb-alvarado 2018-11-28 09:05:05 +01:00
parent b6ec070629
commit e7dbfed518

View File

@ -236,10 +236,14 @@ def check_process(watch_proc, terminate_proc, play_thread):
while True: while True:
sleep(4) sleep(4)
if watch_proc.poll() is not None: if watch_proc.poll() is not None:
logger.error(
'postprocess is not alive anymore, terminate ffplayout!')
terminate_proc.terminate() terminate_proc.terminate()
break break
if not play_thread.is_alive(): if not play_thread.is_alive():
logger.error(
'preprocess is not alive anymore, terminate ffplayout!')
terminate_proc.terminate() terminate_proc.terminate()
break break