summaryrefslogtreecommitdiff
path: root/slixmpp/xmlstream/xmlstream.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2015-07-28 23:54:11 +0200
committerFlorent Le Coz <louiz@louiz.org>2015-08-08 17:34:05 +0200
commitf9c7fa92ea8b07baa56bce111915322237fd8256 (patch)
tree162df421d9ef0a672f264238fcfd66dfb57095c7 /slixmpp/xmlstream/xmlstream.py
parente75a160d52f8850155fd1a62813bd532cf58ffc0 (diff)
downloadslixmpp-f9c7fa92ea8b07baa56bce111915322237fd8256.tar.gz
slixmpp-f9c7fa92ea8b07baa56bce111915322237fd8256.tar.bz2
slixmpp-f9c7fa92ea8b07baa56bce111915322237fd8256.tar.xz
slixmpp-f9c7fa92ea8b07baa56bce111915322237fd8256.zip
Reset the connect future after a disconnect
Diffstat (limited to 'slixmpp/xmlstream/xmlstream.py')
-rw-r--r--slixmpp/xmlstream/xmlstream.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/slixmpp/xmlstream/xmlstream.py b/slixmpp/xmlstream/xmlstream.py
index 35d57869..f6bd97a9 100644
--- a/slixmpp/xmlstream/xmlstream.py
+++ b/slixmpp/xmlstream/xmlstream.py
@@ -435,9 +435,11 @@ class XMLStream(asyncio.BaseProtocol):
Forcibly close the connection
"""
if self.transport:
+ self.transport.close()
self.transport.abort()
self.event("killed")
self.disconnected.set_result(True)
+ self.disconnected = asyncio.Future()
def reconnect(self, wait=2.0):
"""Calls disconnect(), and once we are disconnected (after the timeout, or