summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2021-01-29 16:07:44 +0100
committermathieui <mathieui@mathieui.net>2021-01-29 16:07:44 +0100
commitf93af07882d19fd60af1696ccfa784ac4c03aa42 (patch)
tree1836f0e2981b2d7f64130bc11038ea9c9ee9cf86
parent3f739e513be8fdb3b00f78665650c6bf3c3f9911 (diff)
downloadslixmpp-f93af07882d19fd60af1696ccfa784ac4c03aa42.tar.gz
slixmpp-f93af07882d19fd60af1696ccfa784ac4c03aa42.tar.bz2
slixmpp-f93af07882d19fd60af1696ccfa784ac4c03aa42.tar.xz
slixmpp-f93af07882d19fd60af1696ccfa784ac4c03aa42.zip
XEP-0198: do not send acks when disconnected
-rw-r--r--slixmpp/plugins/xep_0198/stream_management.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/slixmpp/plugins/xep_0198/stream_management.py b/slixmpp/plugins/xep_0198/stream_management.py
index 30274ecf..1344235a 100644
--- a/slixmpp/plugins/xep_0198/stream_management.py
+++ b/slixmpp/plugins/xep_0198/stream_management.py
@@ -174,6 +174,9 @@ class XEP_0198(BasePlugin):
def send_ack(self):
"""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['h'] = self.handled
self.xmpp.send_raw(str(ack))