mirror of
https://github.com/correl/SleekXMPP.git
synced 2024-11-24 03:00:15 +00:00
* fixed xmlstream bugs with unexpected disconnect
This commit is contained in:
parent
9cbc29149f
commit
00d46ee2b0
1 changed files with 3 additions and 2 deletions
|
@ -258,10 +258,11 @@ class XMLStream(object):
|
|||
data = data.encode('utf-8')
|
||||
try:
|
||||
self.socket.send(data)
|
||||
except socket.error,(errno, strerror):
|
||||
#except socket.error,(errno, strerror):
|
||||
except:
|
||||
self.state.set('connected', False)
|
||||
if self.state.reconnect:
|
||||
logging.error("Disconnected. Socket Error #%s: %s" % (errno,strerror))
|
||||
logging.error("Disconnected. Socket Error.")
|
||||
self.disconnect(reconnect=True)
|
||||
return False
|
||||
return True
|
||||
|
|
Loading…
Reference in a new issue