From 934e00f11267ef949a007c9f9aa5623383074dbe Mon Sep 17 00:00:00 2001 From: alemidev Date: Mon, 29 Nov 2021 03:50:33 +0100 Subject: [PATCH] stop faster --- aiocraft/client.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/aiocraft/client.py b/aiocraft/client.py index 83dfaea..b3b294d 100644 --- a/aiocraft/client.py +++ b/aiocraft/client.py @@ -188,7 +188,8 @@ class MinecraftClient(CallbacksHolder, Runnable): await self.dispatcher.disconnect() if not self.options.reconnect: break - await asyncio.sleep(self.options.reconnect_delay) + if self._processing: # if client was stopped exit immediately + await asyncio.sleep(self.options.reconnect_delay) await self.stop(force=True) async def _handshake(self) -> bool: # TODO make this fancier! poll for version and status first