mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 06:57:28 -06:00
Fix an error when closing USB connection. This error raised several
times in the crash reports in the stats.
This commit is contained in:
parent
7b4cb11240
commit
e7ac2e37b4
1 changed files with 2 additions and 1 deletions
|
@ -394,7 +394,8 @@ class USBPrinterOutputDevice(PrinterOutputDevice):
|
|||
self._listen_thread.join()
|
||||
except:
|
||||
pass
|
||||
self._serial.close()
|
||||
if self._serial is not None: # Avoid a race condition when a thread can change the value of self._serial to None
|
||||
self._serial.close()
|
||||
|
||||
self._listen_thread = threading.Thread(target = self._listen)
|
||||
self._listen_thread.daemon = True
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue