summaryrefslogtreecommitdiff
path: root/src/Network/BitTorrent/Client.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Network/BitTorrent/Client.hs')
-rw-r--r--src/Network/BitTorrent/Client.hs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Network/BitTorrent/Client.hs b/src/Network/BitTorrent/Client.hs
index bd4993ba..fce8cfe2 100644
--- a/src/Network/BitTorrent/Client.hs
+++ b/src/Network/BitTorrent/Client.hs
@@ -84,7 +84,11 @@ exchangeOptions pid Options {..} = Exchange.Options
84 } 84 }
85 85
86connHandler :: MVar (HashMap InfoHash Handle) -> Exchange.Handler 86connHandler :: MVar (HashMap InfoHash Handle) -> Exchange.Handler
87connHandler _tmap = undefined 87connHandler tmap ih = do
88 m <- readMVar tmap
89 case HM.lookup ih m of
90 Nothing -> error "torrent not found"
91 Just (Handle {..}) -> return exchange
88 92
89initClient :: Options -> LogFun -> ResIO Client 93initClient :: Options -> LogFun -> ResIO Client
90initClient opts @ Options {..} logFun = do 94initClient opts @ Options {..} logFun = do