summaryrefslogtreecommitdiff
path: root/src/Network/BitTorrent.hs
diff options
context:
space:
mode:
authorSam T <pxqr.sta@gmail.com>2013-07-04 03:42:37 +0400
committerSam T <pxqr.sta@gmail.com>2013-07-04 03:42:37 +0400
commit5120f62b06f8b337ee885ff61bd1e07b34c47581 (patch)
tree0f1d289b8454b69e8135548af1117f8bdea62c49 /src/Network/BitTorrent.hs
parent3b76aa644cffbfb36953146663930b69ced0d18c (diff)
+ Add JSON instance for ScrapeInfo.
Diffstat (limited to 'src/Network/BitTorrent.hs')
-rw-r--r--src/Network/BitTorrent.hs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Network/BitTorrent.hs b/src/Network/BitTorrent.hs
index 95a4c4e3..4f6eaf16 100644
--- a/src/Network/BitTorrent.hs
+++ b/src/Network/BitTorrent.hs
@@ -151,6 +151,8 @@ exchange storage = {-# SCC exchange #-} (awaitEvent >>= handler)
151 when done $ do 151 when done $ do
152 yieldEvent $ Available $ singleton blkPiece (succ blkPiece) 152 yieldEvent $ Available $ singleton blkPiece (succ blkPiece)
153 153
154 -- WARN this is not reliable: if peer do not return all piece
155 -- block we could slow don't until some other event occured
154 offer <- peerOffer 156 offer <- peerOffer
155 if BF.null offer 157 if BF.null offer
156 then return () 158 then return ()