summaryrefslogtreecommitdiff
path: root/src/Network/BitTorrent/Client.hs
diff options
context:
space:
mode:
authorSam Truzjan <pxqr.sta@gmail.com>2014-02-20 06:25:03 +0400
committerSam Truzjan <pxqr.sta@gmail.com>2014-02-20 06:25:03 +0400
commit2fee3e9d893973b3db7af606e6583d2ccd9d05eb (patch)
tree05ea0dd83d3b791d24806ac987c24e40df253476 /src/Network/BitTorrent/Client.hs
parent0f76501d5bdc033fd5b3a821021f2c319ec314da (diff)
Fix some warnings
Diffstat (limited to 'src/Network/BitTorrent/Client.hs')
-rw-r--r--src/Network/BitTorrent/Client.hs7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/Network/BitTorrent/Client.hs b/src/Network/BitTorrent/Client.hs
index 7a50b6ba..349283c3 100644
--- a/src/Network/BitTorrent/Client.hs
+++ b/src/Network/BitTorrent/Client.hs
@@ -39,7 +39,6 @@ import Control.Exception
39import Control.Concurrent 39import Control.Concurrent
40import Control.Monad.Logger 40import Control.Monad.Logger
41import Control.Monad.Trans 41import Control.Monad.Trans
42import Control.Monad.Trans.Resource
43 42
44import Data.Default 43import Data.Default
45import Data.HashMap.Strict as HM 44import Data.HashMap.Strict as HM
@@ -84,15 +83,15 @@ exchangeOptions pid Options {..} = Exchange.Options
84 , optBacklog = optBacklog def 83 , optBacklog = optBacklog def
85 } 84 }
86 85
87--connHandler :: HashMap InfoHash Handle -> Handler 86connHandler :: MVar (HashMap InfoHash Handle) -> Exchange.Handler
88connHandler tmap = undefined 87connHandler _tmap = undefined
89 88
90newClient :: Options -> LogFun -> IO Client 89newClient :: Options -> LogFun -> IO Client
91newClient opts @ Options {..} logger = do 90newClient opts @ Options {..} logger = do
92 pid <- genPeerId 91 pid <- genPeerId
93 tmap <- newMVar HM.empty 92 tmap <- newMVar HM.empty
94 tmgr <- Tracker.newManager def (PeerInfo pid Nothing optPort) 93 tmgr <- Tracker.newManager def (PeerInfo pid Nothing optPort)
95 emgr <- Exchange.newManager (exchangeOptions pid opts) connHandler 94 emgr <- Exchange.newManager (exchangeOptions pid opts) (connHandler tmap)
96 node <- do 95 node <- do
97 node <- startNode defaultHandlers def optNodeAddr logger 96 node <- startNode defaultHandlers def optNodeAddr logger
98 runDHT node $ bootstrap (maybeToList optBootNode) 97 runDHT node $ bootstrap (maybeToList optBootNode)