home · contact · privacy
Replace connection-broken logging with .connection_state setting. master
authorChristian Heller <c.heller@plomlompom.de>
Sat, 20 Sep 2025 08:49:28 +0000 (10:49 +0200)
committerChristian Heller <c.heller@plomlompom.de>
Sat, 20 Sep 2025 08:49:28 +0000 (10:49 +0200)
ircplom/client.py
test.txt

index fcdf520db3d17090e5759c00388224a9cc95ee0d..7d569422ebf8347c2c39bd9ba5b9412f4bde1204 100644 (file)
@@ -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
index 78f622d5901bb6ad9691df1032dbb8cea8200ea7..803917f75f72cd1726f5e92a6cb0d91dbb3eddc6 100644 (file)
--- a/test.txt
+++ b/test.txt
 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