summaryrefslogtreecommitdiff
path: root/sleekxmpp/xmlstream
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2013-01-11 17:19:29 -0800
committerLance Stout <lancestout@gmail.com>2013-01-11 17:19:29 -0800
commita0266dac6f30a1bfa89360a16ec70904b552f0a1 (patch)
treec1be293ec9e48c78ac9c1c54d6c1e6f65cb13555 /sleekxmpp/xmlstream
parent8644a83ed9fce8e0be746ce92f87b80534a56bf5 (diff)
parentce977a78091189099b339363d4d856c443d29710 (diff)
downloadslixmpp-a0266dac6f30a1bfa89360a16ec70904b552f0a1.tar.gz
slixmpp-a0266dac6f30a1bfa89360a16ec70904b552f0a1.tar.bz2
slixmpp-a0266dac6f30a1bfa89360a16ec70904b552f0a1.tar.xz
slixmpp-a0266dac6f30a1bfa89360a16ec70904b552f0a1.zip
Merge branch 'master' into develop
Diffstat (limited to 'sleekxmpp/xmlstream')
-rw-r--r--sleekxmpp/xmlstream/xmlstream.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/sleekxmpp/xmlstream/xmlstream.py b/sleekxmpp/xmlstream/xmlstream.py
index 7955fee5..3f87df52 100644
--- a/sleekxmpp/xmlstream/xmlstream.py
+++ b/sleekxmpp/xmlstream/xmlstream.py
@@ -560,7 +560,6 @@ class XMLStream(object):
self.set_socket(self.socket, ignore=True)
#this event is where you should set your application state
self.event("connected", direct=True)
- self.reconnect_delay = 1.0
return True
except (Socket.error, ssl.SSLError) as serr:
error_msg = "Could not connect to %s:%s. Socket Error #%s: %s"
@@ -1493,6 +1492,10 @@ class XMLStream(object):
# as handshakes.
self.stream_end_event.clear()
self.start_stream_handler(root)
+
+ # We have a successful stream connection, so reset
+ # exponential backoff for new reconnect attempts.
+ self.reconnect_delay = 1.0
depth += 1
if event == b'end':
depth -= 1