fix priority inversion
low cost ==> high priority
This commit is contained in:
parent
a52c552f0b
commit
0b1015370b
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue