Reset the connect future after a disconnect
This commit is contained in:
parent
e75a160d52
commit
f9c7fa92ea
@ -435,9 +435,11 @@ class XMLStream(asyncio.BaseProtocol):
|
|||||||
Forcibly close the connection
|
Forcibly close the connection
|
||||||
"""
|
"""
|
||||||
if self.transport:
|
if self.transport:
|
||||||
|
self.transport.close()
|
||||||
self.transport.abort()
|
self.transport.abort()
|
||||||
self.event("killed")
|
self.event("killed")
|
||||||
self.disconnected.set_result(True)
|
self.disconnected.set_result(True)
|
||||||
|
self.disconnected = asyncio.Future()
|
||||||
|
|
||||||
def reconnect(self, wait=2.0):
|
def reconnect(self, wait=2.0):
|
||||||
"""Calls disconnect(), and once we are disconnected (after the timeout, or
|
"""Calls disconnect(), and once we are disconnected (after the timeout, or
|
||||||
|
Loading…
Reference in New Issue
Block a user