Skip to content

Commit

Permalink
properly shutdown gr thread
Browse files Browse the repository at this point in the history
  • Loading branch information
jopohl committed Apr 14, 2018
1 parent 42148cd commit 4330aab
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/urh/dev/gr/AbstractBaseThread.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,13 +277,16 @@ def enqueue_output(self, out, queue):
def stop(self, msg: str):
if msg and not msg.startswith("FIN"):
self.requestInterruption()
time.sleep(0.1)

if self.tb_process:
try:
logger.info("Kill grc process")
self.tb_process.kill()
logger.info("Term grc process")
self.tb_process.terminate()
self.tb_process = None
except AttributeError:
pass

logger.info(msg)
self.stopped.emit()

0 comments on commit 4330aab

Please sign in to comment.