summaryrefslogtreecommitdiff
path: root/sleekxmpp/clientxmpp.py
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2011-01-09 10:04:09 -0500
committerLance Stout <lancestout@gmail.com>2011-01-09 10:04:09 -0500
commit23e499998fc36b377e3adb77d3d59f885d94f21d (patch)
tree3dcef998633c65ea320cd2acfdaadb394e4ee773 /sleekxmpp/clientxmpp.py
parentc156a4f723073e1e6394803b5bb1613227947266 (diff)
parentacdf9e2d22dd604578f50d0a9b67c47e001da69f (diff)
downloadslixmpp-23e499998fc36b377e3adb77d3d59f885d94f21d.tar.gz
slixmpp-23e499998fc36b377e3adb77d3d59f885d94f21d.tar.bz2
slixmpp-23e499998fc36b377e3adb77d3d59f885d94f21d.tar.xz
slixmpp-23e499998fc36b377e3adb77d3d59f885d94f21d.zip
Merge branch 'develop' into roster
Diffstat (limited to 'sleekxmpp/clientxmpp.py')
-rw-r--r--sleekxmpp/clientxmpp.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/sleekxmpp/clientxmpp.py b/sleekxmpp/clientxmpp.py
index 1a5e0886..c08cd648 100644
--- a/sleekxmpp/clientxmpp.py
+++ b/sleekxmpp/clientxmpp.py
@@ -138,7 +138,7 @@ class ClientXMPP(BaseXMPP):
log.debug("Session start has taken more than 15 seconds")
self.disconnect(reconnect=self.auto_reconnect)
- def connect(self, address=tuple()):
+ def connect(self, address=tuple(), reattempt=True):
"""
Connect to the XMPP server.
@@ -147,7 +147,9 @@ class ClientXMPP(BaseXMPP):
will be used.
Arguments:
- address -- A tuple containing the server's host and port.
+ address -- A tuple containing the server's host and port.
+ reattempt -- If True, reattempt the connection if an
+ error occurs.
"""
self.session_started_event.clear()
if not address or len(address) < 2:
@@ -189,7 +191,8 @@ class ClientXMPP(BaseXMPP):
# If all else fails, use the server from the JID.
address = (self.boundjid.host, 5222)
- return XMLStream.connect(self, address[0], address[1], use_tls=True)
+ return XMLStream.connect(self, address[0], address[1],
+ use_tls=True, reattempt=reattempt)
def register_feature(self, mask, pointer, breaker=False):
"""