From 953d59788e5b72ac8ef27bc88a65e84a4d6789e8 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Thu, 6 Apr 2017 13:57:39 +0200 Subject: [PATCH] Only try to close connection when there is a connection to close CURA-3603 --- plugins/UM3NetworkPrinting/NetworkPrinterOutputDevice.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/UM3NetworkPrinting/NetworkPrinterOutputDevice.py b/plugins/UM3NetworkPrinting/NetworkPrinterOutputDevice.py index a4f05a6f75..a4aea5ecb8 100755 --- a/plugins/UM3NetworkPrinting/NetworkPrinterOutputDevice.py +++ b/plugins/UM3NetworkPrinting/NetworkPrinterOutputDevice.py @@ -716,7 +716,8 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice): ## Start requesting data from printer def connect(self): - self.close() # Ensure that previous connection (if any) is killed. + if self.isConnected(): + self.close() # Close previous connection self._createNetworkManager()