Only try to close connection when there is a connection to close

CURA-3603
This commit is contained in:
Jaime van Kessel 2017-04-06 13:57:39 +02:00
parent 8f6a210c75
commit 953d59788e

View file

@ -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()