commit b8f971fcd61e92a28e92fb23cab7dbfab269cecf parent a3611af26a3f996c3a011689e250027639dbb2d3 Author: ThomasV <thomasv@gitorious> Date: Tue, 16 Sep 2014 12:21:01 +0200 force reconnect after delay Diffstat:
M | lib/network.py | | | 7 | +++++++ |
1 file changed, 7 insertions(+), 0 deletions(-)
diff --git a/lib/network.py b/lib/network.py @@ -385,6 +385,13 @@ class Network(threading.Thread): print_error('network: retrying connections') self.disconnected_servers = set([]) self.disconnected_time = time.time() + + if not self.interface.is_connected: + if time.time() - self.disconnected_time > DISCONNECTED_RETRY_INTERVAL: + print_error("forcing reconnection") + self.queue.put((self.interface, None)) + self.disconnected_time = time.time() + continue if response is not None: