From 107fa37aa629f1ed9cd6c40a3261219f02be0f80 Mon Sep 17 00:00:00 2001 From: JRoberts <8711996+jr-simplex@users.noreply.github.com> Date: Fri, 16 Sep 2022 19:41:53 +0400 Subject: [PATCH] core: don't check agent msg matches expected response of async cmd if it's ERR (#1062) --- src/Simplex/Chat.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Simplex/Chat.hs b/src/Simplex/Chat.hs index 360b10fdb2..0946ee7711 100644 --- a/src/Simplex/Chat.hs +++ b/src/Simplex/Chat.hs @@ -1749,7 +1749,7 @@ processAgentMessage (Just user@User {userId, profile}) corrId agentConnId agentM cmdData_ <- withStore' $ \db -> getCommandDataByCorrId db user corrId case cmdData_ of Just cmdData@CommandData {cmdId, cmdConnId = Just cmdConnId', cmdFunction} - | connId == cmdConnId' && agentMsgTag == commandExpectedResponse cmdFunction -> do + | connId == cmdConnId' && (agentMsgTag == commandExpectedResponse cmdFunction || agentMsgTag == ERR_) -> do withStore' $ \db -> deleteCommand db user cmdId action cmdData | otherwise -> err cmdId $ "not matching connection id or unexpected response, corrId = " <> show corrId