summaryrefslogtreecommitdiff
path: root/src/Network/BitTorrent
diff options
context:
space:
mode:
Diffstat (limited to 'src/Network/BitTorrent')
-rw-r--r--src/Network/BitTorrent/Client/Handle.hs11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/Network/BitTorrent/Client/Handle.hs b/src/Network/BitTorrent/Client/Handle.hs
index e7884caa..d68c57cc 100644
--- a/src/Network/BitTorrent/Client/Handle.hs
+++ b/src/Network/BitTorrent/Client/Handle.hs
@@ -78,9 +78,14 @@ openTorrent rootPath t @ Torrent {..} = do
78 allocHandle ih $ do 78 allocHandle ih $ do
79 c @ Client {..} <- getClient 79 c @ Client {..} <- getClient
80 tses <- liftIO $ Tracker.newSession ih (trackerList t) 80 tses <- liftIO $ Tracker.newSession ih (trackerList t)
81 eses <- liftIO $ Exchange.newSession clientLogger (externalAddr c) rootPath 81 eses <- liftIO $ Exchange.newSession clientLogger (externalAddr c)
82 tInfoDict 82 rootPath tInfoDict
83 return $ Handle ih (idPrivate tInfoDict) tses eses 83 return $ Handle
84 { topic = ih
85 , private = idPrivate tInfoDict
86 , trackers = tses
87 , exchange = eses
88 }
84 89
85-- | Use 'nullMagnet' to open handle from 'InfoHash'. 90-- | Use 'nullMagnet' to open handle from 'InfoHash'.
86openMagnet :: FilePath -> Magnet -> BitTorrent Handle 91openMagnet :: FilePath -> Magnet -> BitTorrent Handle