Fix running process() with a timeout (closes #3505)
This commit is contained in:
parent
992d80dd09
commit
7128ea249b
@ -524,7 +524,7 @@ class XMLStream(asyncio.BaseProtocol):
|
||||
else:
|
||||
self.loop.run_until_complete(self.disconnected)
|
||||
else:
|
||||
tasks: List[Awaitable] = [asyncio.sleep(timeout)]
|
||||
tasks: List[Awaitable] = [asyncio.Task(asyncio.sleep(timeout))]
|
||||
if not forever:
|
||||
tasks.append(self.disconnected)
|
||||
self.loop.run_until_complete(asyncio.wait(tasks))
|
||||
|
Loading…
Reference in New Issue
Block a user