aboutsummaryrefslogtreecommitdiff
path: root/Assistant/TransferQueue.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-10-14 15:09:37 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-10-14 15:09:37 -0400
commit9b0dfb0dedcb8343bb39ca33785892ab4642e901 (patch)
tree544976fa4d8b71d54b2edfe17b0490243967a004 /Assistant/TransferQueue.hs
parent1c42979918649797c239e0441ccf531ebde430eb (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.hs2
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) $