summaryrefslogtreecommitdiff
path: root/Kademlia.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Kademlia.hs')
-rw-r--r--Kademlia.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Kademlia.hs b/Kademlia.hs
index 017209a7..f256366f 100644
--- a/Kademlia.hs
+++ b/Kademlia.hs
@@ -8,7 +8,7 @@ module Kademlia where
8 8
9import Data.Function 9import Data.Function
10import Data.Maybe 10import Data.Maybe
11import qualified Data.Set as Set 11import qualified Data.Set as Set
12import Data.Time.Clock (getCurrentTime) 12import Data.Time.Clock (getCurrentTime)
13import Data.Time.Clock.POSIX (getPOSIXTime, utcTimeToPOSIXSeconds) 13import Data.Time.Clock.POSIX (getPOSIXTime, utcTimeToPOSIXSeconds)
14import Network.DHT.Routing as R 14import Network.DHT.Routing as R
@@ -286,7 +286,7 @@ refreshBucket sch var n = do
286 tbl <- readTVar var 286 tbl <- readTVar var
287 let counts = R.shape tbl 287 let counts = R.shape tbl
288 when (n == R.bucketNumber (searchSpace sch) (kademliaLocation (searchSpace sch) found_node) tbl) 288 when (n == R.bucketNumber (searchSpace sch) (kademliaLocation (searchSpace sch) found_node) tbl)
289 $ modifyTVar resultCounter (Set.insert found_node) 289 $ modifyTVar' resultCounter (Set.insert found_node)
290 resultCount <- readTVar resultCounter 290 resultCount <- readTVar resultCounter
291 saveit $ case drop (n - 1) counts of 291 saveit $ case drop (n - 1) counts of
292 (cnt:_) | cnt < fullcount -> True 292 (cnt:_) | cnt < fullcount -> True