diff --git a/src/aiomail/client.py b/src/aiomail/client.py index b9b77d6..c542ecd 100644 --- a/src/aiomail/client.py +++ b/src/aiomail/client.py @@ -93,6 +93,11 @@ class IMAPClient: self._mail = None if attempt < self.max_retries - 1: await asyncio.sleep(2 * (attempt + 1)) + # terminal signal: all attempts are exhausted and this SWALLOWS the failure into a + # False return the caller branches on. without this line the per-attempt WARNINGs are + # the only trace, so a genuinely dead connection could look like routine noise - log + # the terminal exhaustion loudly so real degradation is visible, then return False. + log.warning("connect to %s failed after %d attempts", self.host, self.max_retries) return False @staticmethod