Merge branch 'hacks' of github.com:tomstrummer/SleekXMPP into hacks

This commit is contained in:
Thom Nichols 2010-06-29 16:48:15 -04:00
commit 5d87a54913

View file

@ -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...")