delete connexion when it must be done

This commit is contained in:
Yann Leboulanger 2004-04-02 01:26:48 +00:00
parent f366cd3db6
commit a9be10ace3
1 changed files with 2 additions and 2 deletions

View File

@ -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()