mirror of
https://github.com/correl/SleekXMPP.git
synced 2024-11-27 19:19:54 +00:00
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.
This commit is contained in:
parent
1a93a187f0
commit
888e286a09
1 changed files with 2 additions and 6 deletions
|
@ -530,12 +530,8 @@ class XMLStream(object):
|
||||||
"""
|
"""
|
||||||
Reset the stream's state and reconnect to the server.
|
Reset the stream's state and reconnect to the server.
|
||||||
"""
|
"""
|
||||||
log.debug("reconnecting...")
|
self.disconnect()
|
||||||
self.state.transition('connected', 'disconnected', wait=2.0,
|
self.connect()
|
||||||
func=self._disconnect, args=(True,))
|
|
||||||
log.debug("connecting...")
|
|
||||||
return self.state.transition('disconnected', 'connected',
|
|
||||||
wait=2.0, func=self._connect)
|
|
||||||
|
|
||||||
def set_socket(self, socket, ignore=False):
|
def set_socket(self, socket, ignore=False):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in a new issue