diff --git a/LinksAwakeningClient.py b/LinksAwakeningClient.py index 298788098d9e..7b74cd323238 100644 --- a/LinksAwakeningClient.py +++ b/LinksAwakeningClient.py @@ -560,6 +560,10 @@ async def server_auth(self, password_requested: bool = False): while self.client.auth == None: await asyncio.sleep(0.1) + + # Just return if we're closing + if self.exit_event.is_set(): + return self.auth = self.client.auth await self.send_connect()