mirror of
https://github.com/simplex-chat/simplexmq.git
synced 2026-04-05 06:45:51 +00:00
agent: process message sent in expired response to ACK (it will increase duplicates count) (#1175)
This commit is contained in:
committed by
GitHub
parent
ab7b350521
commit
c8b2bb2ae1
@@ -2102,7 +2102,6 @@ processSMPTransmissions c@AgentClient {subQ} (tSess@(_, srv, _), _v, sessId, ts)
|
||||
Left e -> lift $ notifyErr connId e
|
||||
STResponse (Cmd SRecipient cmd) respOrErr ->
|
||||
withRcvConn entId $ \rq conn -> case cmd of
|
||||
-- TODO process expired responses to ACK and DEL
|
||||
SMP.SUB -> case respOrErr of
|
||||
Right SMP.OK -> processSubOk rq upConnIds
|
||||
Right msg@SMP.MSG {} -> do
|
||||
@@ -2110,7 +2109,10 @@ processSMPTransmissions c@AgentClient {subQ} (tSess@(_, srv, _), _v, sessId, ts)
|
||||
processSMP rq conn (toConnData conn) msg
|
||||
Right r -> processSubErr rq $ unexpectedResponse r
|
||||
Left e -> unless (temporaryClientError e) $ processSubErr rq e -- timeout/network was already reported
|
||||
_ -> pure ()
|
||||
SMP.ACK _ -> case respOrErr of
|
||||
Right msg@SMP.MSG {} -> processSMP rq conn (toConnData conn) msg
|
||||
_ -> pure () -- TODO process OK response to ACK
|
||||
_ -> pure () -- TODO process expired response to DEL
|
||||
STResponse {} -> pure () -- TODO process expired responses to sent messages
|
||||
STUnexpectedError e -> do
|
||||
logServer "<--" c srv entId $ "error: " <> bshow e
|
||||
|
||||
Reference in New Issue
Block a user