summaryrefslogtreecommitdiff
path: root/Assistant/Threads/Transferrer.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-08-12 12:36:08 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-08-12 12:36:08 -0400
commita73e271d604616e1e0cdb5d2720e851d7b9acb73 (patch)
treea87a0bb5988d5005c689882c3e335b9504d065d7 /Assistant/Threads/Transferrer.hs
parentb6b8f6da9ce18c92cd5c813e07f06d392731bf86 (diff)
run resumed transfers immediately, do not wait for free transfer slot
The resumed transfer still uses a slot, so will delay other, queued transfers from starting.
Diffstat (limited to 'Assistant/Threads/Transferrer.hs')
-rw-r--r--Assistant/Threads/Transferrer.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/Assistant/Threads/Transferrer.hs b/Assistant/Threads/Transferrer.hs
index c349acf44..8118a3f3c 100644
--- a/Assistant/Threads/Transferrer.hs
+++ b/Assistant/Threads/Transferrer.hs
@@ -38,7 +38,7 @@ transfererThread st dstatus transferqueue slots = go
( do
debug thisThread [ "Transferring:" , show t ]
notifyTransfer dstatus
- transferThread dstatus slots t info
+ transferThread dstatus slots t info inTransferSlot
, do
debug thisThread [ "Skipping unnecessary transfer:" , show t ]
-- getNextTransfer added t to the
@@ -78,12 +78,12 @@ shouldTransfer t info
- the transfer info; the thread will also be killed when a transfer is
- stopped, to avoid it displaying any alert about the transfer having
- failed. -}
-transferThread :: DaemonStatusHandle -> TransferSlots -> Transfer -> TransferInfo -> IO ()
-transferThread dstatus slots t info = case (transferRemote info, associatedFile info) of
+transferThread :: DaemonStatusHandle -> TransferSlots -> Transfer -> TransferInfo -> TransferSlotRunner -> IO ()
+transferThread dstatus slots t info runner = case (transferRemote info, associatedFile info) of
(Nothing, _) -> noop
(_, Nothing) -> noop
(Just remote, Just file) -> do
- tid <- inTransferSlot slots $
+ tid <- runner slots $
transferprocess remote file
updateTransferInfo dstatus t $ info { transferTid = Just tid }
where