mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-08 13:09:02 +08:00
Added logging when the post was aborted due to connection loss
CURA-2295
This commit is contained in:
parent
083c60123a
commit
d0823ebff0
@ -268,11 +268,13 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice):
|
|||||||
# Some operating systems handle this themselves, others give weird issues.
|
# Some operating systems handle this themselves, others give weird issues.
|
||||||
try:
|
try:
|
||||||
if self._post_reply:
|
if self._post_reply:
|
||||||
self._post_reply.abort()
|
Logger.log("d", "Stopping post upload because the connection was lost.")
|
||||||
try:
|
try:
|
||||||
self._post_reply.uploadProgress.disconnect(self._onUploadProgress)
|
self._post_reply.uploadProgress.disconnect(self._onUploadProgress)
|
||||||
except TypeError:
|
except TypeError:
|
||||||
pass # The disconnection can fail on mac in some cases. Ignore that.
|
pass # The disconnection can fail on mac in some cases. Ignore that.
|
||||||
|
|
||||||
|
self._post_reply.abort()
|
||||||
self._progress_message.hide()
|
self._progress_message.hide()
|
||||||
except RuntimeError:
|
except RuntimeError:
|
||||||
self._post_reply = None # It can happen that the wrapped c++ object is already deleted.
|
self._post_reply = None # It can happen that the wrapped c++ object is already deleted.
|
||||||
@ -292,11 +294,13 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice):
|
|||||||
# Some operating systems handle this themselves, others give weird issues.
|
# Some operating systems handle this themselves, others give weird issues.
|
||||||
try:
|
try:
|
||||||
if self._post_reply:
|
if self._post_reply:
|
||||||
self._post_reply.abort()
|
Logger.log("d", "Stopping post upload because the connection was lost.")
|
||||||
try:
|
try:
|
||||||
self._post_reply.uploadProgress.disconnect(self._onUploadProgress)
|
self._post_reply.uploadProgress.disconnect(self._onUploadProgress)
|
||||||
except TypeError:
|
except TypeError:
|
||||||
pass # The disconnection can fail on mac in some cases. Ignore that.
|
pass # The disconnection can fail on mac in some cases. Ignore that.
|
||||||
|
|
||||||
|
self._post_reply.abort()
|
||||||
self._progress_message.hide()
|
self._progress_message.hide()
|
||||||
except RuntimeError:
|
except RuntimeError:
|
||||||
self._post_reply = None # It can happen that the wrapped c++ object is already deleted.
|
self._post_reply = None # It can happen that the wrapped c++ object is already deleted.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user