changeset 9e4291659c93 in /home/hg/repos/gajim

author: Fabian Pietsch <fab...@canvon.de>
branches: 
details:http://hg.gajim.org/gajim?cmd=changeset;node=9e4291659c93
description: link-local: on error after connect(), try next address

diffstat:

 src/common/zeroconf/client_zeroconf.py |  10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r c8f8fcd1a239 -r 9e4291659c93 src/common/zeroconf/client_zeroconf.py
--- a/src/common/zeroconf/client_zeroconf.py    Mon Apr 06 16:33:10 2015 +0200
+++ b/src/common/zeroconf/client_zeroconf.py    Mon Apr 06 18:55:23 2015 +0200
@@ -376,8 +376,8 @@
 
     def connect_to_next_ip(self):
         if len(self.ais) == 0:
+            log.error('Connection failure to %s', str(self.host), 
exc_info=True)
             if len(self.addresses_) > 0: return self.get_next_addrinfo()
-            log.error('Connection failure to %s', str(self.host), 
exc_info=True)
             self.disconnect()
             return
         ai = self.ais.pop(0)
@@ -489,8 +489,12 @@
         self._do_send()
 
     def pollend(self):
-        self.state = -1
-        self.disconnect()
+        if self.state == 0:  # error in connect()?
+            #self.disconnect()
+            self.connect_to_next_ip()
+        else:
+            self.state = -1
+            self.disconnect()
 
     def pollin(self):
         """
_______________________________________________
Commits mailing list
Commits@gajim.org
https://lists.gajim.org/cgi-bin/listinfo/commits

Reply via email to