Only close connection if it's open when re-checking connections

This commit is contained in:
Jaime van Kessel 2016-06-28 15:00:35 +02:00
parent 4c7d235a0d
commit bc50f0fa7c

View file

@ -44,6 +44,7 @@ class NetworkPrinterOutputDevicePlugin(OutputDevicePlugin):
self._printers[key].connect()
self._printers[key].connectionStateChanged.connect(self._onPrinterConnectionStateChanged)
else:
if self._printers[key].isConnected():
self._printers[key].close()
## Because the model needs to be created in the same thread as the QMLEngine, we use a signal.