From: Christian Heller Date: Sat, 20 Sep 2025 08:49:28 +0000 (+0200) Subject: Replace connection-broken logging with .connection_state setting. X-Git-Url: https://plomlompom.com/repos/booking/process?a=commitdiff_plain;p=ircplom Replace connection-broken logging with .connection_state setting. --- diff --git a/ircplom/client.py b/ircplom/client.py index fcdf520..7d56942 100644 --- a/ircplom/client.py +++ b/ircplom/client.py @@ -812,7 +812,7 @@ class Client(ABC, ClientQueueMixin): def on_handled_loop_exception(self, e: IrcConnAbortException) -> None: 'Gracefully handle broken connection.' - self._log(f'connection broken: {e}', alert=True) + self.db.connection_state = f'broken: {e}' self.close() @abstractmethod diff --git a/test.txt b/test.txt index 78f622d..803917f 100644 --- a/test.txt +++ b/test.txt @@ -422,7 +422,7 @@ 2:11 > USER baz 0 * :baz 2:11 > NICK :baz 2: < FAKE_IRC_CONN_ABORT_EXCEPTION -10,11 !$ connection broken: FAKE_IRC_CONN_ABORT_EXCEPTION +10,11 $ connection_state set to: [broken: FAKE_IRC_CONN_ABORT_EXCEPTION] 10,11 $ connection_state set to: [] , $ DISCONNECTED 10,11 $ isupport cleared