summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoe <joe@jerkface.net>2017-07-28 05:12:03 -0400
committerjoe <joe@jerkface.net>2017-07-28 05:12:03 -0400
commit40d376e7a41267fd4e96eb95a5ad728429deeed5 (patch)
tree17dc815ec1ebd10cf94081cd8b07b984b2cbce4b
parent7f7ede57388ed29e0fbaab9aac6b9211f67ee3e2 (diff)
Removed async-pool as dependency for dhtd executable.
-rw-r--r--bittorrent.cabal1
-rw-r--r--examples/dhtd.hs7
2 files changed, 4 insertions, 4 deletions
diff --git a/bittorrent.cabal b/bittorrent.cabal
index 5f5af8c7..a22f6550 100644
--- a/bittorrent.cabal
+++ b/bittorrent.cabal
@@ -334,7 +334,6 @@ executable dhtd
334 default-language: Haskell2010 334 default-language: Haskell2010
335 build-depends: base, network, bytestring, hashable, deepseq 335 build-depends: base, network, bytestring, hashable, deepseq
336 , aeson 336 , aeson
337 , async-pool
338 , pretty 337 , pretty
339 , bittorrent 338 , bittorrent
340 , unix 339 , unix
diff --git a/examples/dhtd.hs b/examples/dhtd.hs
index b63bd6fc..9bb7c5a7 100644
--- a/examples/dhtd.hs
+++ b/examples/dhtd.hs
@@ -53,7 +53,7 @@ import Network.DHT.Routing as R
53import Data.Aeson as J (ToJSON, FromJSON) 53import Data.Aeson as J (ToJSON, FromJSON)
54import qualified Data.Aeson as J 54import qualified Data.Aeson as J
55import qualified Data.ByteString.Lazy as L 55import qualified Data.ByteString.Lazy as L
56import Control.Concurrent.Async.Pool 56import Tasks
57import System.IO.Error 57import System.IO.Error
58import qualified Data.Serialize as S 58import qualified Data.Serialize as S
59import Network.BitTorrent.DHT.ContactInfo as Peers 59import Network.BitTorrent.DHT.ContactInfo as Peers
@@ -139,8 +139,9 @@ pingNodes netname DHT{dhtPing} = do
139 Right ns -> do fork $ do 139 Right ns -> do fork $ do
140 myThreadId >>= flip labelThread ("pinging."++fname) 140 myThreadId >>= flip labelThread ("pinging."++fname)
141 putStrLn $ "Forked "++show fname 141 putStrLn $ "Forked "++show fname
142 withTaskGroup 10 $ \g -> do 142 withTaskGroup ("withTaskGroup."++fname) 10 $ \g -> do
143 mapTasks_ g (map dhtPing ns) 143 mapM_ (\n -> forkTask g (show n) $ void $ dhtPing n)
144 (ns `asTypeOf` [])
144 putStrLn $ "Load finished "++show fname 145 putStrLn $ "Load finished "++show fname
145 return True 146 return True
146 147