summaryrefslogtreecommitdiff
path: root/src/Network
diff options
context:
space:
mode:
authorjoe <joe@jerkface.net>2017-09-13 04:14:15 -0400
committerjoe <joe@jerkface.net>2017-09-13 04:14:36 -0400
commitcdde5bb2bb7ff77a84c88375f6fe3453e1d6af49 (patch)
treedc6a6d8cb99651cccaf5246c918e12db2a3a64cc /src/Network
parentf6678edece2fa77a5ff91abfc8c19913e4d1acdd (diff)
Make freshPeers a little more strict.
Diffstat (limited to 'src/Network')
-rw-r--r--src/Network/BitTorrent/DHT/ContactInfo.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Network/BitTorrent/DHT/ContactInfo.hs b/src/Network/BitTorrent/DHT/ContactInfo.hs
index 9c336f93..89c2ec17 100644
--- a/src/Network/BitTorrent/DHT/ContactInfo.hs
+++ b/src/Network/BitTorrent/DHT/ContactInfo.hs
@@ -219,7 +219,7 @@ freshPeers ih tm (PeerStore m) = fromMaybe ([],PeerStore m) $ do
219 _ -> peers swarm 219 _ -> peers swarm
220 ps = L.map (key . fst) ps0 220 ps = L.map (key . fst) ps0
221 m' = HM.insert ih swarm { peers = L.foldl' (\q p -> PSQ.insert p tm q) peers' ps } m 221 m' = HM.insert ih swarm { peers = L.foldl' (\q p -> PSQ.insert p tm q) peers' ps } m
222 return $! (ps,PeerStore m') 222 return $! m' `seq` (ps,PeerStore m')
223 223
224incomp :: (x -> Maybe (r,x)) -> x -> Maybe ((r,x),x) 224incomp :: (x -> Maybe (r,x)) -> x -> Maybe ((r,x),x)
225incomp !f !x = do 225incomp !f !x = do