mirror of
https://github.com/correl/SleekXMPP.git
synced 2024-12-22 11:09:11 +00:00
Merge branch 'hacks' of github.com:tomstrummer/SleekXMPP into hacks
This commit is contained in:
commit
5d87a54913
1 changed files with 20 additions and 19 deletions
|
@ -302,7 +302,8 @@ class XMLStream(object):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def disconnect(self, reconnect=False):
|
def disconnect(self, reconnect=False):
|
||||||
if not self.state.transition('connected','disconnected'):
|
with self.state.transition_ctx('connected','disconnected') as locked:
|
||||||
|
if not locked:
|
||||||
logging.warning("Already disconnected.")
|
logging.warning("Already disconnected.")
|
||||||
return
|
return
|
||||||
logging.debug("Disconnecting...")
|
logging.debug("Disconnecting...")
|
||||||
|
|
Loading…
Reference in a new issue