mirror of
https://github.com/correl/SleekXMPP.git
synced 2024-11-27 19:19:54 +00:00
misc small tweaks
This commit is contained in:
parent
c4699b92e6
commit
d88999691c
3 changed files with 5 additions and 3 deletions
|
@ -357,8 +357,8 @@ class ClientXMPP(BaseXMPP):
|
||||||
xml -- The SASL authentication failure element.
|
xml -- The SASL authentication failure element.
|
||||||
"""
|
"""
|
||||||
logging.info("Authentication failed.")
|
logging.info("Authentication failed.")
|
||||||
|
self.event("failed_auth", direct=True)
|
||||||
self.disconnect()
|
self.disconnect()
|
||||||
self.event("failed_auth")
|
|
||||||
|
|
||||||
def _handle_bind_resource(self, xml):
|
def _handle_bind_resource(self, xml):
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -174,7 +174,7 @@ class Scheduler(object):
|
||||||
self.run = False
|
self.run = False
|
||||||
if self.parentstop is not None:
|
if self.parentstop is not None:
|
||||||
self.parentstop.set()
|
self.parentstop.set()
|
||||||
logging.debug("Qutting Scheduler thread")
|
logging.debug("Quitting Scheduler thread")
|
||||||
if self.parentqueue is not None:
|
if self.parentqueue is not None:
|
||||||
self.parentqueue.put(('quit', None, None))
|
self.parentqueue.put(('quit', None, None))
|
||||||
|
|
||||||
|
|
|
@ -331,6 +331,7 @@ class XMLStream(object):
|
||||||
logging.debug("reconnecting...")
|
logging.debug("reconnecting...")
|
||||||
self.state.transition('connected', 'disconnected', wait=2.0,
|
self.state.transition('connected', 'disconnected', wait=2.0,
|
||||||
func=self._disconnect, args=(True,))
|
func=self._disconnect, args=(True,))
|
||||||
|
logging.debug("connecting...")
|
||||||
return self.state.transition('disconnected', 'connected',
|
return self.state.transition('disconnected', 'connected',
|
||||||
wait=2.0, func=self._connect)
|
wait=2.0, func=self._connect)
|
||||||
|
|
||||||
|
@ -693,7 +694,8 @@ class XMLStream(object):
|
||||||
except Socket.error:
|
except Socket.error:
|
||||||
logging.exception('Socket Error')
|
logging.exception('Socket Error')
|
||||||
except:
|
except:
|
||||||
logging.exception('Connection error. Reconnecting.')
|
if not self.stop.isSet():
|
||||||
|
logging.exception('Connection error.')
|
||||||
if not self.stop.isSet() and self.auto_reconnect:
|
if not self.stop.isSet() and self.auto_reconnect:
|
||||||
self.reconnect()
|
self.reconnect()
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue