mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-07-04 10:35:10 +08:00
Both timeout cases now abort the upload
CURA-1851
This commit is contained in:
parent
26eaedaa2c
commit
f60871e068
@ -234,6 +234,12 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice):
|
|||||||
self._connection_state_before_timeout = self._connection_state
|
self._connection_state_before_timeout = self._connection_state
|
||||||
self._connection_message = Message(i18n_catalog.i18nc("@info:status", "The connection with the printer was lost. Check your network-connections."))
|
self._connection_message = Message(i18n_catalog.i18nc("@info:status", "The connection with the printer was lost. Check your network-connections."))
|
||||||
self._connection_message.show()
|
self._connection_message.show()
|
||||||
|
# Check if we were uploading something. Abort if this is the case.
|
||||||
|
# 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)
|
||||||
|
self._progress_message.hide()
|
||||||
self.setConnectionState(ConnectionState.error)
|
self.setConnectionState(ConnectionState.error)
|
||||||
|
|
||||||
if self._authentication_state == AuthState.NotAuthenticated:
|
if self._authentication_state == AuthState.NotAuthenticated:
|
||||||
@ -486,6 +492,9 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice):
|
|||||||
# Some operating systems handle this themselves, others give weird issues.
|
# Some operating systems handle this themselves, others give weird issues.
|
||||||
if self._post_reply:
|
if self._post_reply:
|
||||||
self._post_reply.abort()
|
self._post_reply.abort()
|
||||||
|
self._post_reply.uploadProgress.disconnect(self._onUploadProgress)
|
||||||
|
self._progress_message.hide()
|
||||||
|
|
||||||
self.setConnectionState(ConnectionState.error)
|
self.setConnectionState(ConnectionState.error)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user