catch exception when we disconnect

This commit is contained in:
Yann Leboulanger 2005-05-31 16:47:05 +00:00
parent 9e4929feb5
commit 19e7cd6fb5
1 changed files with 4 additions and 1 deletions

View File

@ -668,7 +668,10 @@ class Connection:
if msg:
p.setStatus(msg)
self.connection.send(p)
self.connection.disconnect()
try:
self.connection.disconnect()
except:
pass
self.dispatch('STATUS', 'offline')
self.connection = None
elif show != 'offline' and self.connected: