mirror of
https://github.com/transmission/transmission
synced 2024-12-26 09:37:56 +00:00
(trunk libT) #1242 "don't accept duplicate blocks during endgame" -- fixed in trunk for 1.92
This commit is contained in:
parent
c6a76932b2
commit
6b546e8b4b
1 changed files with 4 additions and 1 deletions
|
@ -1603,13 +1603,16 @@ clientGotBlock( tr_peermsgs * msgs,
|
|||
return EMSGSIZE;
|
||||
}
|
||||
|
||||
/* save the block */
|
||||
dbgmsg( msgs, "got block %u:%u->%u", req->index, req->offset, req->length );
|
||||
|
||||
if( !tr_peerMgrDidPeerRequest( msgs->torrent, msgs->peer, block ) ) {
|
||||
dbgmsg( msgs, "we didn't ask for this message..." );
|
||||
return 0;
|
||||
}
|
||||
if( tr_cpPieceIsComplete( &msgs->torrent->completion, req->index ) ) {
|
||||
dbgmsg( msgs, "we did ask for this message, but the piece is already complete..." );
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
*** Save the block
|
||||
|
|
Loading…
Reference in a new issue