mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-15 19:35:54 +08: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
@ -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…
x
Reference in New Issue
Block a user