From 28bfc364725c8c5feefc42d1d9693b25503c30ee Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Thu, 8 Sep 2016 16:37:10 +0200 Subject: [PATCH] Recreate network manager count is now always increased once --- NetworkPrinterOutputDevice.py | 1 + 1 file changed, 1 insertion(+) diff --git a/NetworkPrinterOutputDevice.py b/NetworkPrinterOutputDevice.py index de78a03467..b119f5ff8b 100644 --- a/NetworkPrinterOutputDevice.py +++ b/NetworkPrinterOutputDevice.py @@ -246,6 +246,7 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice): # Re-creating the QNetworkManager seems to fix this issue. if self._last_response_time and self._connection_state_before_timeout: if time_since_last_response > self._recreate_network_manager_time * self._recreate_network_manager_count: + self._recreate_network_manager_count += 1 # It can happen that we had a very long timeout (multiple times the recreate time). # In that case we should jump through the point that the next update won't be right away. while time_since_last_response - self._recreate_network_manager_time * self._recreate_network_manager_count > self._recreate_network_manager_time: