summaryrefslogtreecommitdiff
path: root/sleekxmpp/xmlstream/xmlstream.py
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2011-11-07 01:13:34 -0800
committerLance Stout <lancestout@gmail.com>2011-11-07 01:13:34 -0800
commit888e286a09647ed70abb6b69dd8114268a7712ac (patch)
treea1180323ad6f5ae077f6da82f19a26bb29049070 /sleekxmpp/xmlstream/xmlstream.py
parent1a93a187f0d5216d20ef0b40d08b93372a5e717d (diff)
downloadslixmpp-888e286a09647ed70abb6b69dd8114268a7712ac.tar.gz
slixmpp-888e286a09647ed70abb6b69dd8114268a7712ac.tar.bz2
slixmpp-888e286a09647ed70abb6b69dd8114268a7712ac.tar.xz
slixmpp-888e286a09647ed70abb6b69dd8114268a7712ac.zip
Continue trying to reconnect, even if the attempt fails.
The transition from disconnected to connected states must be done in a loop in case the transition fails, not just once and hope it worked.
Diffstat (limited to 'sleekxmpp/xmlstream/xmlstream.py')
-rw-r--r--sleekxmpp/xmlstream/xmlstream.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/sleekxmpp/xmlstream/xmlstream.py b/sleekxmpp/xmlstream/xmlstream.py
index 8abbb3a1..c9b85bd8 100644
--- a/sleekxmpp/xmlstream/xmlstream.py
+++ b/sleekxmpp/xmlstream/xmlstream.py
@@ -530,12 +530,8 @@ class XMLStream(object):
"""
Reset the stream's state and reconnect to the server.
"""
- log.debug("reconnecting...")
- self.state.transition('connected', 'disconnected', wait=2.0,
- func=self._disconnect, args=(True,))
- log.debug("connecting...")
- return self.state.transition('disconnected', 'connected',
- wait=2.0, func=self._connect)
+ self.disconnect()
+ self.connect()
def set_socket(self, socket, ignore=False):
"""