Browse files

Inform the PieceMgr correctly about blocks.

Unfortunately, a bug had snuck into the code so we did not tell the
Piece Manager about any blocks were downloaded. The problem with this
change is that no progression is then being made on downloading pieces.

Patch fixes the problem by using the correct communication channel and
  • Loading branch information...
jlouis committed Feb 5, 2010
1 parent eb21a63 commit f3915c1fe3cf08e7ecda9be567039fa8f7144ac2
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/PeerP.hs
@@ -423,7 +423,7 @@ peerP pMgrC pieceMgrC fsC pm logC nPieces h outBound inBound sendBWC statC supC
pushPiece (pn, blk) =
syncP =<< sendPC outCh (SendQMsg $ Request pn blk)
storeBlock n blk bs =
- syncP =<< sendPC fsCh (WriteBlock n blk bs)
+ syncP =<< sendPC pieceMgrCh (StoreBlock n blk bs)
grabBlocks n = do
c <- liftIO $ channel
ps <- gets peerPieces

0 comments on commit f3915c1

Please sign in to comment.