From 8cc9e8cf723169511b3a15f307e2db97eaa2c146 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 17 Aug 2016 12:38:51 +0200 Subject: [PATCH] Post requests are now aborted when connection is timed out CURA-1851 --- NetworkPrinterOutputDevice.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/NetworkPrinterOutputDevice.py b/NetworkPrinterOutputDevice.py index 96fb3f050d..93fedf0c85 100644 --- a/NetworkPrinterOutputDevice.py +++ b/NetworkPrinterOutputDevice.py @@ -482,6 +482,10 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice): if reply.error() == QNetworkReply.TimeoutError: Logger.log("w", "Received a timeout on a request to the printer") self._connection_state_before_timeout = self._connection_state + # 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.setConnectionState(ConnectionState.error) return