summaryrefslogtreecommitdiff
path: root/src/Network/BitTorrent/Tracker.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Network/BitTorrent/Tracker.hs')
-rw-r--r--src/Network/BitTorrent/Tracker.hs7
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
37import Network.URI 37import Network.URI
38 38
39import Network.BitTorrent.Peer 39import Network.BitTorrent.Peer
40import Network.BitTorrent.PeerID
41import Network.BitTorrent.Tracker.Protocol 40import Network.BitTorrent.Tracker.Protocol
42import Network.BitTorrent.Tracker.Scrape 41import Network.BitTorrent.Tracker.Scrape
43 42
@@ -137,13 +136,13 @@ completedReq ses pr = (genericReq ses pr) {
137data TSession = TSession { 136data 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
143newSession :: Progress -> Int -> [Peer] -> IO TSession 142newSession :: Progress -> Int -> [PeerAddr] -> IO TSession
144newSession pr i ps = TSession <$> newTVarIO pr <*> newIORef i <*> newTVarIO ps 143newSession pr i ps = TSession <$> newTVarIO pr <*> newIORef i <*> newTVarIO ps
145 144
146getPeerList :: TSession -> IO [Peer] 145getPeerList :: TSession -> IO [PeerAddr]
147getPeerList = readTVarIO . sePeers 146getPeerList = readTVarIO . sePeers
148 147
149getProgress :: TSession -> IO Progress 148getProgress :: TSession -> IO Progress