summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxime Buquet <pep@bouah.net>2020-03-29 14:28:06 +0200
committerMaxime Buquet <pep@bouah.net>2020-03-29 14:28:06 +0200
commita16e2a0f6c6dcd3bde55fce1771b7bb5c22cf38c (patch)
tree586cc7bf98c940898bd4b87093a9ae131d76784f
parent842aa3be8ff80e93f0183c511d172b8d76da1ce7 (diff)
parent6c28b49e7f1d0a9203270aa2644080c296a995dd (diff)
downloadslixmpp-a16e2a0f6c6dcd3bde55fce1771b7bb5c22cf38c.tar.gz
slixmpp-a16e2a0f6c6dcd3bde55fce1771b7bb5c22cf38c.tar.bz2
slixmpp-a16e2a0f6c6dcd3bde55fce1771b7bb5c22cf38c.tar.xz
slixmpp-a16e2a0f6c6dcd3bde55fce1771b7bb5c22cf38c.zip
Merge branch 'fix-0198' into 'master'
XEP-0198: unset end_session_on_disconnect on resume/enable See merge request poezio/slixmpp!36
-rw-r--r--slixmpp/plugins/xep_0198/stream_management.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/slixmpp/plugins/xep_0198/stream_management.py b/slixmpp/plugins/xep_0198/stream_management.py
index 2b68faec..0200646a 100644
--- a/slixmpp/plugins/xep_0198/stream_management.py
+++ b/slixmpp/plugins/xep_0198/stream_management.py
@@ -83,10 +83,6 @@ class XEP_0198(BasePlugin):
self.xmpp.register_stanza(stanza.Ack)
self.xmpp.register_stanza(stanza.RequestAck)
- # Only end the session when a </stream> element is sent,
- # not just because the connection has died.
- self.xmpp.end_session_on_disconnect = False
-
# Register the feature twice because it may be ordered two
# different ways: enabling after binding and resumption
# before binding.
@@ -246,6 +242,7 @@ class XEP_0198(BasePlugin):
self.enabled_in = True
self.handled = 0
self.xmpp.event('sm_enabled', stanza)
+ self.xmpp.end_session_on_disconnect = False
def _handle_resumed(self, stanza):
"""Finish resuming a stream by resending unacked stanzas.
@@ -258,6 +255,7 @@ class XEP_0198(BasePlugin):
for id, stanza in self.unacked_queue:
self.xmpp.send(stanza, use_filters=False)
self.xmpp.event('session_resumed', stanza)
+ self.xmpp.end_session_on_disconnect = False
def _handle_failed(self, stanza):
"""