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