diff --git a/libtransmission/peer.c b/libtransmission/peer.c index bca1ce346..e4151025b 100644 --- a/libtransmission/peer.c +++ b/libtransmission/peer.c @@ -693,7 +693,7 @@ writeEnd: const int n = TR_BLOCKS_IN_PIECE( tor, piece ); const int end = firstBlock + n; int block; - for( block=firstBlock; block0 && blockcompletion, block )) @@ -716,6 +716,9 @@ writeEnd: tr_free( pool ); } + assert( peer->inRequestCount <= peer->inRequestMax ); + assert( peer->inRequestMax <= peer->inRequestAlloc ); + return TR_OK; }