summaryrefslogtreecommitdiff
path: root/src/Network/BitTorrent/Exchange/Protocol.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Network/BitTorrent/Exchange/Protocol.hs')
-rw-r--r--src/Network/BitTorrent/Exchange/Protocol.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Network/BitTorrent/Exchange/Protocol.hs b/src/Network/BitTorrent/Exchange/Protocol.hs
index 6b97d8d1..d2d3da6c 100644
--- a/src/Network/BitTorrent/Exchange/Protocol.hs
+++ b/src/Network/BitTorrent/Exchange/Protocol.hs
@@ -181,7 +181,7 @@ handshake sock hs = do
181 181
182 case checkIH (S.decode resp) of 182 case checkIH (S.decode resp) of
183 Right hs' -> return hs' 183 Right hs' -> return hs'
184 Left msg -> throw $ userError msg 184 Left msg -> throwIO $ userError $ msg ++ " in handshake body."
185 where 185 where
186 checkIH (Right hs') 186 checkIH (Right hs')
187 | hsInfoHash hs /= hsInfoHash hs' 187 | hsInfoHash hs /= hsInfoHash hs'
@@ -234,10 +234,10 @@ ppBlockIx BlockIx {..} =
234 234
235data Block = Block { 235data Block = Block {
236 -- | Zero-based piece index. 236 -- | Zero-based piece index.
237 blkPiece :: !PieceLIx 237 blkPiece :: {-# UNPACK #-} !PieceLIx
238 238
239 -- | Zero-based byte offset within the piece. 239 -- | Zero-based byte offset within the piece.
240 , blkOffset :: !Int 240 , blkOffset :: {-# UNPACK #-} !Int
241 241
242 -- | Payload. 242 -- | Payload.
243 , blkData :: !ByteString 243 , blkData :: !ByteString