From ad6174ea90ae3936ba76cf62fa1582180ed3f75a Mon Sep 17 00:00:00 2001 From: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com> Date: Mon, 15 May 2023 18:12:41 +0400 Subject: [PATCH] remove agentOperationBracket from file transfer --- src/Simplex/FileTransfer/Agent.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Simplex/FileTransfer/Agent.hs b/src/Simplex/FileTransfer/Agent.hs index 36940fce4..b50031f96 100644 --- a/src/Simplex/FileTransfer/Agent.hs +++ b/src/Simplex/FileTransfer/Agent.hs @@ -415,7 +415,7 @@ runXFTPSndPrepareWorker c doWork = do createChunk :: Int -> SndFileChunk -> m () createChunk numRecipients' ch = do atomically $ assertAgentForeground c - (replica, ProtoServerWithAuth srv _) <- agentOperationBracket c AOSndNetwork throwWhenInactive tryCreate + (replica, ProtoServerWithAuth srv _) <- tryCreate withStore' c $ \db -> createSndFileReplica db ch replica addXFTPSndWorker c $ Just srv where @@ -445,7 +445,7 @@ runXFTPSndWorker c srv doWork = do forever $ do void . atomically $ readTMVar doWork atomically $ assertAgentForeground c - agentOperationBracket c AOSndNetwork throwWhenInactive runXFTPOperation + runXFTPOperation where noWorkToDo = void . atomically $ tryTakeTMVar doWork runXFTPOperation :: m ()