mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-16 04:55:55 +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,6 +394,7 @@ class USBPrinterOutputDevice(PrinterOutputDevice):
|
|||||||
self._listen_thread.join()
|
self._listen_thread.join()
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
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._serial.close()
|
||||||
|
|
||||||
self._listen_thread = threading.Thread(target = self._listen)
|
self._listen_thread = threading.Thread(target = self._listen)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user