summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2012-07-13 02:20:55 +0200
committermathieui <mathieui@mathieui.net>2012-07-13 02:22:25 +0200
commit93228356597df66ebcb38f3f4fb8fbc07f198cec (patch)
tree0b24abc86cd183b524e546c09d4e28d7a97ad2ff
parent66d9ddbefd88da72d2064403a94ffe9d34a544c6 (diff)
downloadpoezio-93228356597df66ebcb38f3f4fb8fbc07f198cec.tar.gz
poezio-93228356597df66ebcb38f3f4fb8fbc07f198cec.tar.bz2
poezio-93228356597df66ebcb38f3f4fb8fbc07f198cec.tar.xz
poezio-93228356597df66ebcb38f3f4fb8fbc07f198cec.zip
Finally fix the ipv6 issues.
- with reattempt = True & max_attempts = 0
-rw-r--r--src/connection.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/connection.py b/src/connection.py
index cf7ff72c..80c41ee8 100644
--- a/src/connection.py
+++ b/src/connection.py
@@ -43,6 +43,7 @@ class Connection(sleekxmpp.ClientXMPP):
sleekxmpp.ClientXMPP.__init__(self, jid, password)
self.core = None
self.auto_reconnect = True if config.get('auto_reconnect', 'false').lower() in ('true', '1') else False
+ self.reconnect_max_attempts = 0
self.auto_authorize = None
self.ca_certs = config.get('ca_cert_path', '') or None
interval = config.get('whitespace_interval', '300')
@@ -80,11 +81,11 @@ class Connection(sleekxmpp.ClientXMPP):
if custom_port == -1:
custom_port = 5222
if custom_host:
- res = self.connect((custom_host, custom_port), reattempt=False)
+ res = self.connect((custom_host, custom_port), reattempt=True)
elif custom_port != 5222 and custom_port != -1:
- res = self.connect((self.boundjid.host, custom_port), reattempt=False)
+ res = self.connect((self.boundjid.host, custom_port), reattempt=True)
else:
- res = self.connect(reattempt=False)
+ res = self.connect(reattempt=True)
if not res:
return False
self.process(threaded=True)