delete connexion when it must be done
This commit is contained in:
parent
f366cd3db6
commit
a9be10ace3
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue