diff options
author | Link Mauve <linkmauve@linkmauve.fr> | 2020-12-02 17:28:03 +0100 |
---|---|---|
committer | Link Mauve <linkmauve@linkmauve.fr> | 2020-12-02 17:28:03 +0100 |
commit | 54b9721f3a67beb6580d09a307c9f8b168d96568 (patch) | |
tree | d2520c3ea762afded68288edc25a447a57911805 | |
parent | c20b72376e0ae970aeb88bc2b48dc29a586c339c (diff) | |
parent | b27510f05b31093d535edd679b59b997de34e32e (diff) | |
download | slixmpp-54b9721f3a67beb6580d09a307c9f8b168d96568.tar.gz slixmpp-54b9721f3a67beb6580d09a307c9f8b168d96568.tar.bz2 slixmpp-54b9721f3a67beb6580d09a307c9f8b168d96568.tar.xz slixmpp-54b9721f3a67beb6580d09a307c9f8b168d96568.zip |
Merge branch 'xep-0047-fix-sequence-number' into 'master'
XEP-0047: Fix the max sequence number
See merge request poezio/slixmpp!67
-rw-r--r-- | slixmpp/plugins/xep_0047/stream.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/slixmpp/plugins/xep_0047/stream.py b/slixmpp/plugins/xep_0047/stream.py index b3767265..535ba82b 100644 --- a/slixmpp/plugins/xep_0047/stream.py +++ b/slixmpp/plugins/xep_0047/stream.py @@ -36,7 +36,7 @@ class IBBytestream(object): raise socket.error if len(data) > self.block_size: data = data[:self.block_size] - self.send_seq = (self.send_seq + 1) % 65535 + self.send_seq = (self.send_seq + 1) % 65536 seq = self.send_seq if self.use_messages: msg = self.xmpp.Message() @@ -72,7 +72,7 @@ class IBBytestream(object): def _recv_data(self, stanza): new_seq = stanza['ibb_data']['seq'] - if new_seq != (self.recv_seq + 1) % 65535: + if new_seq != (self.recv_seq + 1) % 65536: self.close() raise XMPPError('unexpected-request') self.recv_seq = new_seq |