Skip to content

Commit

Permalink
join simulation thread when simulation stopped (#947)
Browse files Browse the repository at this point in the history
  • Loading branch information
jopohl authored Feb 22, 2022
1 parent eb9d531 commit b277033
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/urh/controller/dialogs/SimulatorDialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ def update_transcript_view(self):
def closeEvent(self, event: QCloseEvent):
self.timer.stop()
self.simulator.stop()
time.sleep(0.1)

self.simulator.cleanup()

self.emit_editing_finished_signals()
Expand Down
1 change: 1 addition & 0 deletions src/urh/simulator/Simulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ def stop(self, msg=""):
self.log_message("Stop simulation" + (" ({})".format(msg.strip()) if msg else ""))
self.is_simulating = False
self.do_restart = False
self.simulation_thread.join(2.5)

# stop devices
if self.sniffer:
Expand Down

0 comments on commit b277033

Please sign in to comment.