diff options
author | Joey Hess <joey@kitenet.net> | 2012-10-14 15:09:37 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-10-14 15:09:37 -0400 |
commit | 9b0dfb0dedcb8343bb39ca33785892ab4642e901 (patch) | |
tree | 544976fa4d8b71d54b2edfe17b0490243967a004 /Assistant/TransferQueue.hs | |
parent | 1c42979918649797c239e0441ccf531ebde430eb (diff) |
reorder
get list of remotes after, rather than before, a potentially blocking action
Diffstat (limited to 'Assistant/TransferQueue.hs')
-rw-r--r-- | Assistant/TransferQueue.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Assistant/TransferQueue.hs b/Assistant/TransferQueue.hs index 766d2b44a..125b6d164 100644 --- a/Assistant/TransferQueue.hs +++ b/Assistant/TransferQueue.hs @@ -104,8 +104,8 @@ queueTransfersMatching matching schedule q dstatus k f direction - any others in the list to try again later. -} queueDeferredDownloads :: Schedule -> TransferQueue -> DaemonStatusHandle -> Annex () queueDeferredDownloads schedule q dstatus = do - rs <- syncRemotes <$> liftIO (getDaemonStatus dstatus) l <- liftIO $ atomically $ swapTVar (deferreddownloads q) [] + rs <- syncRemotes <$> liftIO (getDaemonStatus dstatus) left <- filterM (queue rs) l unless (null left) $ liftIO $ atomically $ modifyTVar' (deferreddownloads q) $ |