diff options
author | Georg Lukas <georg@op-co.de> | 2019-03-26 11:02:28 +0100 |
---|---|---|
committer | Georg Lukas <georg@op-co.de> | 2019-03-26 11:02:28 +0100 |
commit | bcb90a653eef0564a7a6d604b1f7ec809a777520 (patch) | |
tree | 68ac87e9864b2939f9c9b9ae16a4cb0fda15ab1c | |
parent | 7e435b703de9ef184ea92d3822d9f85e3beebf79 (diff) | |
download | slixmpp-bcb90a653eef0564a7a6d604b1f7ec809a777520.tar.gz slixmpp-bcb90a653eef0564a7a6d604b1f7ec809a777520.tar.bz2 slixmpp-bcb90a653eef0564a7a6d604b1f7ec809a777520.tar.xz slixmpp-bcb90a653eef0564a7a6d604b1f7ec809a777520.zip |
Do not close stream on 0-timeout disconnect, allows 0198 resume
-rw-r--r-- | slixmpp/xmlstream/xmlstream.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/slixmpp/xmlstream/xmlstream.py b/slixmpp/xmlstream/xmlstream.py index 9e407d7e..1fe52cee 100644 --- a/slixmpp/xmlstream/xmlstream.py +++ b/slixmpp/xmlstream/xmlstream.py @@ -467,8 +467,8 @@ class XMLStream(asyncio.BaseProtocol): at most `wait` seconds. After the given number of seconds has passed without a response from the serveur, or when the server successfully responds with a closure of its own stream, abort() is - called. If wait is 0.0, this is almost equivalent to calling abort() - directly. + called. If wait is 0.0, this will call abort() directly without closing + the stream. Does nothing if we are not connected. @@ -478,7 +478,8 @@ class XMLStream(asyncio.BaseProtocol): self.disconnect_reason = reason self.cancel_connection_attempt() if self.transport: - self.send_raw(self.stream_footer) + if wait > 0.0: + self.send_raw(self.stream_footer) self.schedule('Disconnect wait', wait, self.abort, repeat=False) |