From 08cd4773b0d9b65398644a8e1400109bc9c2bdee Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Sun, 28 Dec 2008 22:51:39 +0000 Subject: [PATCH] don't try to send some XML if we are disconnected/disconnecting/ Fixes #4605 --- src/common/connection.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/connection.py b/src/common/connection.py index 3caade38c..65fbd21bb 100644 --- a/src/common/connection.py +++ b/src/common/connection.py @@ -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'