Skip to content

Commit

Permalink
agent: remove critical error on subscription timeout (#1146)
Browse files Browse the repository at this point in the history
  • Loading branch information
epoberezkin committed May 11, 2024
1 parent acc7fae commit 103ae06
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Simplex/Messaging/Agent/Client.hs
Original file line number Diff line number Diff line change
Expand Up @@ -637,9 +637,9 @@ reconnectSMPClient tc c tSess@(_, srv, _) qs = do
Nothing -> do
tc' <- atomically $ stateTVar tc $ \i -> (i + 1, i + 1)
maxTC <- asks $ maxSubscriptionTimeouts . config
let err = if tc' >= maxTC then CRITICAL True else INTERNAL
msg = show tc' <> " consecutive subscription timeouts: " <> show (length qs) <> " queues, transport session: " <> show tSess
atomically $ writeTBQueue (subQ c) ("", "", APC SAEConn $ ERR $ err msg)
when (tc' >= maxTC) $ do
let msg = show tc' <> " consecutive subscription timeouts: " <> show (length qs) <> " queues, transport session: " <> show tSess
atomically $ writeTBQueue (subQ c) ("", "", APC SAEConn $ ERR $ INTERNAL msg)
where
resubscribe :: AM ()
resubscribe = do
Expand Down

0 comments on commit 103ae06

Please sign in to comment.