From a9be10ace3cdd0097416aeb9118ca17722da39ae Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Fri, 2 Apr 2004 01:26:48 +0000 Subject: [PATCH] delete connexion when it must be done --- core/core.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/core.py b/core/core.py index 70e6d1d49..869dccd68 100644 --- a/core/core.py +++ b/core/core.py @@ -159,8 +159,9 @@ class GajimCore: if self.connected[self.connexions[con]] == 1: self.connected[self.connexions[con]] = 0 con.disconnect() - del self.connexions[con] self.hub.sendPlugin('STATUS', self.connexions[con], 'offline') + if self.connexions.has_key(con): + del self.connexions[con] # END disconenctedCB def connect(self, account): @@ -278,7 +279,6 @@ class GajimCore: elif (ev[2][0] == 'offline') and (self.connected[ev[1]] == 1): self.connected[ev[1]] = 0 con.disconnect() - del self.connexions[con] self.hub.sendPlugin('STATUS', ev[1], 'offline') if ev[2][0] != 'offline' and self.connected[ev[1]] == 1: p = common.jabber.Presence()