aboutsummaryrefslogtreecommitdiff
path: root/Assistant/ScanRemotes.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-08-24 13:59:35 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-08-24 13:59:35 -0400
commit0b1015370b402d859968944224758b317af16787 (patch)
treeda7410048215278b762c36e6be643161dbe16b96 /Assistant/ScanRemotes.hs
parenta52c552f0bd79c7aabcbf7f9429d0881d0dfa2d3 (diff)
fix priority inversion
low cost ==> high priority
Diffstat (limited to 'Assistant/ScanRemotes.hs')
-rw-r--r--Assistant/ScanRemotes.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/Assistant/ScanRemotes.hs b/Assistant/ScanRemotes.hs
index 85a29584e..bfe953803 100644
--- a/Assistant/ScanRemotes.hs
+++ b/Assistant/ScanRemotes.hs
@@ -47,7 +47,7 @@ addScanRemotes v full rs = atomically $ do
m <- fromMaybe M.empty <$> tryTakeTMVar v
putTMVar v $ M.unionWith merge (M.fromList $ zip rs (map info rs)) m
where
- info r = ScanInfo (Remote.cost r) full
+ info r = ScanInfo (-1 * Remote.cost r) full
merge x y = ScanInfo
{ scanPriority = max (scanPriority x) (scanPriority y)
, fullScan = fullScan x || fullScan y