diff --git a/cabal.project b/cabal.project index f363f3b1c..99adeee01 100644 --- a/cabal.project +++ b/cabal.project @@ -7,7 +7,7 @@ constraints: zip +disable-bzip2 +disable-zstd source-repository-package type: git location: https://github.com/simplex-chat/simplexmq.git - tag: b686bc0c177af1e232a8e9b4bab4ed487c02eb12 + tag: 0fa40fbfb0d578499679a2a5f21d7d9d2da20ee3 source-repository-package type: git diff --git a/scripts/nix/sha256map.nix b/scripts/nix/sha256map.nix index 096e3e837..a63186bc6 100644 --- a/scripts/nix/sha256map.nix +++ b/scripts/nix/sha256map.nix @@ -1,5 +1,5 @@ { - "https://github.com/simplex-chat/simplexmq.git"."b686bc0c177af1e232a8e9b4bab4ed487c02eb12" = "1w7af7cqfzcis1gs4hm7frcj15h1ri4sjnm45rh5j5llsm4chvvg"; + "https://github.com/simplex-chat/simplexmq.git"."0fa40fbfb0d578499679a2a5f21d7d9d2da20ee3" = "116np2msr1pvr5x132aqm5hi5vr2d0gw7y9gfp8q5bi7fb2rdzkh"; "https://github.com/simplex-chat/direct-sqlcipher.git"."34309410eb2069b029b8fc1872deb1e0db123294" = "0kwkmhyfsn2lixdlgl15smgr1h5gjk7fky6abzh8rng2h5ymnffd"; "https://github.com/simplex-chat/sqlcipher-simple.git"."5e154a2aeccc33ead6c243ec07195ab673137221" = "1d1gc5wax4vqg0801ajsmx1sbwvd9y7p7b8mmskvqsmpbwgbh0m0"; "https://github.com/simplex-chat/aeson.git"."3eb66f9a68f103b5f1489382aad89f5712a64db7" = "0kilkx59fl6c3qy3kjczqvm8c3f4n3p0bdk9biyflf51ljnzp4yp"; diff --git a/src/Simplex/Chat.hs b/src/Simplex/Chat.hs index 4317221f2..afc7dcc77 100644 --- a/src/Simplex/Chat.hs +++ b/src/Simplex/Chat.hs @@ -993,9 +993,7 @@ processChatCommand = \case QuitChat -> liftIO exitSuccess ShowVersion -> pure $ CRVersionInfo versionNumber where - withChatLock action = do - ChatController {chatLock = l, smpAgent = a} <- ask - withAgentLock a . withLock l $ action + withChatLock action = asks chatLock >>= (`withLock` action) -- below code would make command responses asynchronous where they can be slow -- in View.hs `r'` should be defined as `id` in this case -- procCmd :: m ChatResponse -> m ChatResponse @@ -1377,10 +1375,8 @@ subscribeUserConnections agentBatchSubscribe user = do void . forkIO $ do threadDelay 1000000 l <- asks chatLock - a <- asks smpAgent - when (fileStatus == FSConnected) . unlessM (isFileActive fileId sndFiles) $ - withAgentLock a . withLock l $ - sendFileChunk user ft + when (fileStatus == FSConnected) . unlessM (isFileActive fileId sndFiles) . withLock l $ + sendFileChunk user ft rcvFileSubsToView :: Map ConnId (Either AgentErrorType ()) -> Map ConnId RcvFileTransfer -> m () rcvFileSubsToView rs = mapM_ (toView . uncurry CRRcvFileSubError) . filterErrors . resultsFor rs pendingConnSubsToView :: Map ConnId (Either AgentErrorType ()) -> Map ConnId PendingContactConnection -> m () diff --git a/stack.yaml b/stack.yaml index 9da8993bd..848d0f4af 100644 --- a/stack.yaml +++ b/stack.yaml @@ -49,7 +49,7 @@ extra-deps: # - simplexmq-1.0.0@sha256:34b2004728ae396e3ae449cd090ba7410781e2b3cefc59259915f4ca5daa9ea8,8561 # - ../simplexmq - github: simplex-chat/simplexmq - commit: b686bc0c177af1e232a8e9b4bab4ed487c02eb12 + commit: 0fa40fbfb0d578499679a2a5f21d7d9d2da20ee3 # - ../direct-sqlcipher - github: simplex-chat/direct-sqlcipher commit: 34309410eb2069b029b8fc1872deb1e0db123294