diff options
Diffstat (limited to 'src/Network/BitTorrent/Tracker.hs')
-rw-r--r-- | src/Network/BitTorrent/Tracker.hs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/Network/BitTorrent/Tracker.hs b/src/Network/BitTorrent/Tracker.hs index 6ecf4fc2..e4bcf2cd 100644 --- a/src/Network/BitTorrent/Tracker.hs +++ b/src/Network/BitTorrent/Tracker.hs | |||
@@ -37,7 +37,6 @@ import Network | |||
37 | import Network.URI | 37 | import Network.URI |
38 | 38 | ||
39 | import Network.BitTorrent.Peer | 39 | import Network.BitTorrent.Peer |
40 | import Network.BitTorrent.PeerID | ||
41 | import Network.BitTorrent.Tracker.Protocol | 40 | import Network.BitTorrent.Tracker.Protocol |
42 | import Network.BitTorrent.Tracker.Scrape | 41 | import Network.BitTorrent.Tracker.Scrape |
43 | 42 | ||
@@ -137,13 +136,13 @@ completedReq ses pr = (genericReq ses pr) { | |||
137 | data TSession = TSession { | 136 | data TSession = TSession { |
138 | seProgress :: TVar Progress | 137 | seProgress :: TVar Progress |
139 | , seInterval :: IORef Int | 138 | , seInterval :: IORef Int |
140 | , sePeers :: TVar [Peer] | 139 | , sePeers :: TVar [PeerAddr] |
141 | } | 140 | } |
142 | 141 | ||
143 | newSession :: Progress -> Int -> [Peer] -> IO TSession | 142 | newSession :: Progress -> Int -> [PeerAddr] -> IO TSession |
144 | newSession pr i ps = TSession <$> newTVarIO pr <*> newIORef i <*> newTVarIO ps | 143 | newSession pr i ps = TSession <$> newTVarIO pr <*> newIORef i <*> newTVarIO ps |
145 | 144 | ||
146 | getPeerList :: TSession -> IO [Peer] | 145 | getPeerList :: TSession -> IO [PeerAddr] |
147 | getPeerList = readTVarIO . sePeers | 146 | getPeerList = readTVarIO . sePeers |
148 | 147 | ||
149 | getProgress :: TSession -> IO Progress | 148 | getProgress :: TSession -> IO Progress |