mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 06:57:28 -06:00
Added extra exception catching for thread joining
This commit is contained in:
parent
c5fd957170
commit
7fda5c84e7
1 changed files with 5 additions and 1 deletions
|
@ -241,7 +241,11 @@ class PrinterConnection(SignalEmitter):
|
||||||
## Close the printer connection
|
## Close the printer connection
|
||||||
def close(self):
|
def close(self):
|
||||||
if self._connect_thread.isAlive():
|
if self._connect_thread.isAlive():
|
||||||
|
try:
|
||||||
self._connect_thread.join()
|
self._connect_thread.join()
|
||||||
|
except Exception as e:
|
||||||
|
pass # This should work, but it does fail sometimes for some reason
|
||||||
|
|
||||||
if self._serial is not None:
|
if self._serial is not None:
|
||||||
self.setIsConnected(False)
|
self.setIsConnected(False)
|
||||||
self._listen_thread.join()
|
self._listen_thread.join()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue