only resume when disconnected not on purpose
This commit is contained in:
parent
d73e277f40
commit
985746d65a
|
@ -776,6 +776,8 @@ class Connection(CommonConnection, ConnectionHandlers):
|
|||
self.connected = 0
|
||||
self.time_to_reconnect = None
|
||||
self.privacy_rules_supported = False
|
||||
if on_purpose:
|
||||
self.sm = Smacks(self)
|
||||
if self.connection:
|
||||
# make sure previous connection is completely closed
|
||||
gajim.proxy65_manager.disconnect(self.connection)
|
||||
|
|
|
@ -421,9 +421,9 @@ class XMPPDispatcher(PlugIn):
|
|||
stanza.props = stanza.getProperties()
|
||||
ID = stanza.getID()
|
||||
# If server supports stream management
|
||||
if self.sm and self.sm.enabled and (stanza.getName() != 'r' or
|
||||
stanza.getName() != 'a' or
|
||||
stanza.getName() != 'enabled' or
|
||||
if self.sm and self.sm.enabled and (stanza.getName() != 'r' and
|
||||
stanza.getName() != 'a' and
|
||||
stanza.getName() != 'enabled' and
|
||||
stanza.getName() != 'resumed'):
|
||||
# increments the number of stanzas that has been handled
|
||||
self.sm.in_h = self.sm.in_h + 1
|
||||
|
|
|
@ -96,7 +96,7 @@ class Smacks():
|
|||
|
||||
if len(self.uqueue) < diff or diff < 0:
|
||||
log.error('Server and client number of stanzas handled mismatch ')
|
||||
return
|
||||
else:
|
||||
|
||||
while (len(self.uqueue) > diff):
|
||||
self.uqueue.pop(0)
|
||||
|
|
Loading…
Reference in New Issue