diff options
Diffstat (limited to 'src/Network/BitTorrent/Tracker/Protocol.hs')
-rw-r--r-- | src/Network/BitTorrent/Tracker/Protocol.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Network/BitTorrent/Tracker/Protocol.hs b/src/Network/BitTorrent/Tracker/Protocol.hs index 000b38c1..616e760b 100644 --- a/src/Network/BitTorrent/Tracker/Protocol.hs +++ b/src/Network/BitTorrent/Tracker/Protocol.hs | |||
@@ -34,6 +34,7 @@ module Network.BitTorrent.Tracker.Protocol | |||
34 | where | 34 | where |
35 | 35 | ||
36 | import Control.Applicative | 36 | import Control.Applicative |
37 | import Control.Monad | ||
37 | import Data.Char as Char | 38 | import Data.Char as Char |
38 | import Data.Word (Word32) | 39 | import Data.Word (Word32) |
39 | import Data.List as L | 40 | import Data.List as L |
@@ -130,7 +131,7 @@ instance BEncodable TResponse where | |||
130 | getPeers (Just (BString s)) | 131 | getPeers (Just (BString s)) |
131 | | B.length s `mod` 6 == 0 = | 132 | | B.length s `mod` 6 == 0 = |
132 | let cnt = B.length s `div` 6 in | 133 | let cnt = B.length s `div` 6 in |
133 | runGet (sequence (L.replicate cnt peerG)) s | 134 | runGet (replicateM cnt peerG) s |
134 | | otherwise = decodingError "peers length not a multiple of 6" | 135 | | otherwise = decodingError "peers length not a multiple of 6" |
135 | where | 136 | where |
136 | peerG = do | 137 | peerG = do |