From cdde5bb2bb7ff77a84c88375f6fe3453e1d6af49 Mon Sep 17 00:00:00 2001 From: joe Date: Wed, 13 Sep 2017 04:14:15 -0400 Subject: Make freshPeers a little more strict. --- src/Network/BitTorrent/DHT/ContactInfo.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Network') 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 _ -> peers swarm ps = L.map (key . fst) ps0 m' = HM.insert ih swarm { peers = L.foldl' (\q p -> PSQ.insert p tm q) peers' ps } m - return $! (ps,PeerStore m') + return $! m' `seq` (ps,PeerStore m') incomp :: (x -> Maybe (r,x)) -> x -> Maybe ((r,x),x) incomp !f !x = do -- cgit v1.2.3