Commit 21400ead authored by Guillaume Seguin's avatar Guillaume Seguin

Fix regression created by 9c55957e

The print thread must always respawn the sender thread when ending (the change
introduced by 9c55957e was checking stop_send_thread, which is set to False by
_start_sender, so it never got it). Instead of adding more logic, let's just
always respawn the thread and kill it immediately.
parent 162d8a05
......@@ -102,10 +102,10 @@ class printcore():
self.stop_read_thread = True
self.read_thread.join()
self.read_thread = None
self._stop_sender()
if self.print_thread:
self.printing = False
self.print_thread.join()
self._stop_sender()
try:
self.printer.close()
except socket.error:
......@@ -429,7 +429,7 @@ class printcore():
traceback.print_exc()
finally:
self.print_thread = None
if self.stop_send_thread == False: self._start_sender()
self._start_sender()
#now only "pause" is implemented as host command
def processHostCommand(self, command):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment