Reset the connect future after a disconnect
This commit is contained in:
parent
e75a160d52
commit
f9c7fa92ea
1 changed files with 2 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue