From f9c7fa92ea8b07baa56bce111915322237fd8256 Mon Sep 17 00:00:00 2001 From: mathieui Date: Tue, 28 Jul 2015 23:54:11 +0200 Subject: Reset the connect future after a disconnect --- slixmpp/xmlstream/xmlstream.py | 2 ++ 1 file changed, 2 insertions(+) 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 -- cgit v1.2.3