mirror of
https://github.com/simplex-chat/simplexmq.git
synced 2026-10-25 08:22:21 +00:00
comment
This commit is contained in:
1 parent
1b8bab91b5
commit
c1b33e68e3
1 file changed
+1
-1
@@ -1127,7 +1127,7 @@ enqueueSavedMessage c cData msgId sq = enqueueSavedMessageB c $ Identity (cData,
|
||||
|
||||
enqueueSavedMessageB :: (AgentMonad' m, Foldable t) => AgentClient -> t (ConnData, [SndQueue], AgentMsgId) -> m ()
|
||||
enqueueSavedMessageB c reqs = do
|
||||
-- saving to the database moved to the start to avoid race conditions when delivery is read from queue before it is saved
|
||||
-- saving to the database has to be before enqueue to avoid race condition when delivery is read from queue before it is saved
|
||||
void $ withStoreBatch' c $ \db -> concatMap (storeDeliveries db) reqs
|
||||
forM_ reqs $ \(cData, sqs, msgId) ->
|
||||
forM sqs $ \sq -> do
|
||||
|
||||
Reference in new issue
Block a user