Skip to content

Commit

Permalink
heal fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ivelin committed Sep 22, 2019
1 parent b5d0f53 commit dab0b5b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/ambianic/pipeline/avsource/av_element.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,9 @@ def _stop_gst_service(self):
log.debug('Gst proess did not terminate.'
' Resorting to force kill.')
gst_proc.kill()
while gst_proc.is_alive():
time.sleep(1)
log.debug('Gst process stopped after kill signal.')
# while gst_proc.is_alive():
# time.sleep(1)
log.debug('Gst process killed.')
else:
log.debug('Gst process stopped after terminate signal.')
else:
Expand Down
3 changes: 2 additions & 1 deletion src/ambianic/pipeline/avsource/gst_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,8 @@ def _gst_cleanup(self):

def _service_shutdown(self, signum, frame):
log.info('GST service caught system shutdown signal %d', signum)
self._gst_cleanup()
if not self._stop_signal.is_set():
self._stop_signal.set()

def _stop_handler(self):
self._stop_signal.wait()
Expand Down

0 comments on commit dab0b5b

Please sign in to comment.