agent: remove critical error on subscription timeout (#1146)

This commit is contained in:
Evgeny Poberezkin
2024-05-11 23:38:27 +01:00
committed by GitHub
parent acc7faea11
commit 103ae06d55
+3 -3
View File
@@ -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