don't try to send some XML if we are disconnected/disconnecting/ Fixes #4605

This commit is contained in:
Yann Leboulanger 2008-12-28 22:51:39 +00:00
parent ac65413376
commit 08cd4773b0
1 changed files with 2 additions and 2 deletions

View File

@ -1088,8 +1088,8 @@ class Connection(ConnectionHandlers):
def _on_disconnected(self):
''' called when a disconnect request has completed successfully'''
self.dispatch('STATUS', 'offline')
self.disconnect(on_purpose=True)
self.dispatch('STATUS', 'offline')
def get_status(self):
return STATUS_LIST[self.connected]
@ -1628,7 +1628,7 @@ class Connection(ConnectionHandlers):
self.connection.send(iq)
def send_gc_status(self, nick, jid, show, status):
if not self.connection:
if not gajim.account_is_connected(self.name):
return
if show == 'invisible':
show = 'offline'