From 49ac56e0f90373a677f9c8f3539b657eec0902a4 Mon Sep 17 00:00:00 2001 From: shum Date: Wed, 3 Jun 2026 21:39:34 +0000 Subject: [PATCH] chat: fix stale CRITICAL comment in saveConnInfo Comment claimed SEDBException is re-thrown as CRITICAL but only SEDBBusyError is (via the `critical` helper at Subscriber.hs:136 and the showCritical branch at :1695). Updated to describe the actual behaviour. --- src/Simplex/Chat/Library/Subscriber.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Simplex/Chat/Library/Subscriber.hs b/src/Simplex/Chat/Library/Subscriber.hs index f24471e547..463f846b1d 100644 --- a/src/Simplex/Chat/Library/Subscriber.hs +++ b/src/Simplex/Chat/Library/Subscriber.hs @@ -368,8 +368,9 @@ processAgentMessageConn :: VersionRangeChat -> User -> ACorrId -> ConnId -> AEve processAgentMessageConn vr user@User {userId} corrId agentConnId agentMessage = do -- Missing connection/entity errors here will be sent to the view but not shown as CRITICAL alert, -- as in this case no need to ACK message - we can't process messages for this connection anyway. - -- SEDBException will be re-trown as CRITICAL as it is likely to indicate a temporary database condition - -- that will be resolved with app restart. + -- SEDBBusyError will be re-thrown as CRITICAL (via `critical`) as it indicates a transient lock/IO + -- condition that usually resolves after app restart. Other SEDBException flavours surface as + -- non-CRITICAL store errors. entity <- critical agentConnId $ withStore (\db -> getConnectionEntity db vr user $ AgentConnId agentConnId) >>= updateConnStatus case agentMessage of END -> case entity of