mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-15 02:55:54 +08:00
Added exception handling for disconnect issues on mac
CURA-1851
This commit is contained in:
parent
1dbd789d10
commit
99892ffd58
@ -238,9 +238,13 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice):
|
||||
# Some operating systems handle this themselves, others give weird issues.
|
||||
if self._post_reply:
|
||||
self._post_reply.abort()
|
||||
self._post_reply.uploadProgress.disconnect(self._onUploadProgress)
|
||||
try:
|
||||
self._post_reply.uploadProgress.disconnect(self._onUploadProgress)
|
||||
except TypeError:
|
||||
pass # The disconnection can fail on mac in some cases. Ignore that.
|
||||
self._progress_message.hide()
|
||||
self.setConnectionState(ConnectionState.error)
|
||||
return
|
||||
|
||||
if self._authentication_state == AuthState.NotAuthenticated:
|
||||
self._verifyAuthentication() # We don't know if we are authenticated; check if we have correct auth.
|
||||
|
Loading…
x
Reference in New Issue
Block a user