mirror of
https://github.com/simplex-chat/simplexmq.git
synced 2026-08-28 07:14:59 +00:00
comment
This commit is contained in:
@@ -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