From cde96c3cd5e93e41b0d3fc12e1dcfacd2b8143bc Mon Sep 17 00:00:00 2001 From: alemidev Date: Thu, 5 May 2022 00:15:23 +0200 Subject: [PATCH] oops was a loop --- src/aiocraft/dispatcher.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/aiocraft/dispatcher.py b/src/aiocraft/dispatcher.py index 103265a..920e6f8 100644 --- a/src/aiocraft/dispatcher.py +++ b/src/aiocraft/dispatcher.py @@ -273,7 +273,7 @@ class Dispatcher: await self.disconnect(block=False) async def _up_worker(self, timeout=1): - while True: + while self._dispatching: try: packet : Packet = await asyncio.wait_for(self._outgoing.get(), timeout=timeout) except asyncio.TimeoutError: