summaryrefslogtreecommitdiff
path: root/Assistant/Threads/TransferWatcher.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-03-01 15:58:44 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-03-01 15:58:44 -0400
commit8909fa66ce0c04094d13fc21db76bbf7700f9d6e (patch)
tree55e9bf5078a77ea1e111e2284e10473998418968 /Assistant/Threads/TransferWatcher.hs
parentbc1d282f5f7a87f61dd5beab7369d0739b7dbaed (diff)
add additional debug info about reasons for drops
Diffstat (limited to 'Assistant/Threads/TransferWatcher.hs')
-rw-r--r--Assistant/Threads/TransferWatcher.hs8
1 files changed, 6 insertions, 2 deletions
diff --git a/Assistant/Threads/TransferWatcher.hs b/Assistant/Threads/TransferWatcher.hs
index fcf573374..7a6e426b3 100644
--- a/Assistant/Threads/TransferWatcher.hs
+++ b/Assistant/Threads/TransferWatcher.hs
@@ -115,10 +115,14 @@ finishedTransfer :: Transfer -> Maybe TransferInfo -> Assistant ()
finishedTransfer t (Just info)
| transferDirection t == Download =
whenM (liftAnnex $ inAnnex $ transferKey t) $ do
- handleDrops False (transferKey t) (associatedFile info) Nothing
+ dodrops False
queueTransfersMatching (/= transferUUID t)
"newly received object"
Later (transferKey t) (associatedFile info) Upload
- | otherwise = handleDrops True (transferKey t) (associatedFile info) Nothing
+ | otherwise = dodrops True
+ where
+ dodrops fromhere = handleDrops
+ ("drop wanted after " ++ describeTransfer t info)
+ fromhere (transferKey t) (associatedFile info) Nothing
finishedTransfer _ _ = noop