XEP-0198: do not send acks when disconnected
This commit is contained in:
parent
3f739e513b
commit
f93af07882
1 changed files with 3 additions and 0 deletions
|
@ -174,6 +174,9 @@ class XEP_0198(BasePlugin):
|
||||||
|
|
||||||
def send_ack(self):
|
def send_ack(self):
|
||||||
"""Send the current ack count to the server."""
|
"""Send the current ack count to the server."""
|
||||||
|
if not self.xmpp.transport:
|
||||||
|
log.debug('Disconnected: not sending ack')
|
||||||
|
return
|
||||||
ack = stanza.Ack(self.xmpp)
|
ack = stanza.Ack(self.xmpp)
|
||||||
ack['h'] = self.handled
|
ack['h'] = self.handled
|
||||||
self.xmpp.send_raw(str(ack))
|
self.xmpp.send_raw(str(ack))
|
||||||
|
|
Loading…
Reference in a new issue