diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Network/BitTorrent/Client/Handle.hs | 11 |
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'. |
86 | openMagnet :: FilePath -> Magnet -> BitTorrent Handle | 91 | openMagnet :: FilePath -> Magnet -> BitTorrent Handle |