From 62488d67017be8a23966bf18db458bdd087aa196 Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Sat, 20 Sep 2025 10:49:28 +0200 Subject: [PATCH] Replace connection-broken logging with .connection_state setting. --- ircplom/client.py | 2 +- test.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 -- 2.30.2