This commit is contained in:
Evgeny Poberezkin
2024-05-04 09:57:25 +01:00
parent 4310a69391
commit 6ee7082269
3 changed files with 4 additions and 3 deletions
+2 -2
View File
@@ -1963,7 +1963,7 @@ subscriber c@AgentClient {subQ, msgQ} = forever $ do
runExceptT (processSMPTransmission c t) >>= \case
Left e -> do
logError $ tshow e
-- atomically $ writeTBQueue subQ ("", "", APC SAEConn $ ERR e)
atomically $ writeTBQueue subQ ("", "", APC SAEConn $ ERR e)
Right _ -> return ()
cleanupManager :: AgentClient -> AM' ()
@@ -2054,7 +2054,7 @@ processSMPTransmission c@AgentClient {smpClients, subQ} (tSess@(_, srv, _), _v,
SMP.MSG msg@SMP.RcvMessage {msgId = srvMsgId} ->
void . handleNotifyAck $ do
isGET <- atomically $ hasGetLock c rq
unless isGET checkSubscription
when (not isGET && isResponse) checkSubscription
msg' <- decryptSMPMessage rq msg
ack' <- handleNotifyAck $ case msg' of
SMP.ClientRcvMsgBody {msgTs = srvTs, msgFlags, msgBody} -> processClientMsg srvTs msgFlags msgBody
+1 -1
View File
@@ -1188,7 +1188,7 @@ subscribeQueues c qs = do
if active
then when (hasTempErrors rs) resubscribe $> rs
else do
unless active $ logWarn "subcription batch result for replaced SMP client, resubscribing"
logWarn "subcription batch result for replaced SMP client, resubscribing"
resubscribe $> L.map (second $ \_ -> Left PCENetworkError) rs
where
tSess = transportSession' smp
+1
View File
@@ -533,6 +533,7 @@ subscribeSMPQueue c@ProtocolClient {client_ = PClient {sendPings}} rpKey rId = d
liftIO . atomically $ writeTVar sendPings True
sendSMPCommand c (Just rpKey) rId SUB >>= \case
OK -> pure ()
SUBOK -> pure ()
cmd@MSG {} -> liftIO $ writeSMPMessage c rId cmd
r -> throwE . PCEUnexpectedResponse $ bshow r