diff --git a/src/urh/controller/dialogs/SimulatorDialog.py b/src/urh/controller/dialogs/SimulatorDialog.py index 4cb6cbd36..24bf47864 100644 --- a/src/urh/controller/dialogs/SimulatorDialog.py +++ b/src/urh/controller/dialogs/SimulatorDialog.py @@ -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() diff --git a/src/urh/simulator/Simulator.py b/src/urh/simulator/Simulator.py index f7c206b67..d470e4672 100644 --- a/src/urh/simulator/Simulator.py +++ b/src/urh/simulator/Simulator.py @@ -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: