mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Catch errors when trying to close the connection thread
Contributes to #82
This commit is contained in:
parent
ae89ef37c0
commit
a83bcedb22
1 changed files with 4 additions and 1 deletions
|
@ -255,7 +255,10 @@ 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():
|
||||||
self._connect_thread.join()
|
try:
|
||||||
|
self._connect_thread.join()
|
||||||
|
except:
|
||||||
|
pass
|
||||||
if self._serial is not None:
|
if self._serial is not None:
|
||||||
self.setIsConnected(False)
|
self.setIsConnected(False)
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue