From 7128ea249b5d90a11e2a578bd158b2076e7e709c Mon Sep 17 00:00:00 2001 From: mathieui Date: Fri, 2 Feb 2024 01:00:25 +0100 Subject: [PATCH] Fix running process() with a timeout (closes #3505) --- slixmpp/xmlstream/xmlstream.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/slixmpp/xmlstream/xmlstream.py b/slixmpp/xmlstream/xmlstream.py index 65409ec7..7df8d420 100644 --- a/slixmpp/xmlstream/xmlstream.py +++ b/slixmpp/xmlstream/xmlstream.py @@ -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))