mirror of
https://github.com/simplex-chat/simplexmq.git
synced 2026-04-27 06:25:15 +00:00
fixes
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user