From: Christian Heller Date: Mon, 3 Nov 2025 05:05:05 +0000 (+0100) Subject: Minor code style improvement. X-Git-Url: https://plomlompom.com/repos/%7B%7B%20web_path%20%7D%7D/static/%7B%7Bprefix%7D%7D/add_structured?a=commitdiff_plain;h=b15ace811cf840bbcdb2458962c51e80914fce92;p=ircplom Minor code style improvement. --- diff --git a/src/ircplom/client.py b/src/ircplom/client.py index d9ce45c..e16c516 100644 --- a/src/ircplom/client.py +++ b/src/ircplom/client.py @@ -896,12 +896,11 @@ class Client(ABC, ClientQueueMixin): def consider_retry(self) -> None: 'Interpret .db.connection_state, on triggers set retry connect.' - if not self._retry_connect_in_s > 0: - for _ in [ - re for re in _DISCONNECT_MSG_REGEXES_TO_RETRY_ON - if re_search(re, self.db.connection_state, re_IGNORECASE)]: - self._retry_connect_in_s = 1 - break + if self._retry_connect_in_s > 0: + return + for _ in [re for re in _DISCONNECT_MSG_REGEXES_TO_RETRY_ON + if re_search(re, self.db.connection_state, re_IGNORECASE)]: + self._retry_connect_in_s = 1 def close(self) -> None: 'Close connection, wipe memory of its states, reconnect if indicated.'