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')
|
data = data.encode('utf-8')
|
||||||
try:
|
try:
|
||||||
self.socket.send(data)
|
self.socket.send(data)
|
||||||
except socket.error,(errno, strerror):
|
#except socket.error,(errno, strerror):
|
||||||
|
except:
|
||||||
self.state.set('connected', False)
|
self.state.set('connected', False)
|
||||||
if self.state.reconnect:
|
if self.state.reconnect:
|
||||||
logging.error("Disconnected. Socket Error #%s: %s" % (errno,strerror))
|
logging.error("Disconnected. Socket Error.")
|
||||||
self.disconnect(reconnect=True)
|
self.disconnect(reconnect=True)
|
||||||
return False
|
return False
|
||||||
return True
|
return True
|
||||||
|
|
Loading…
Reference in a new issue