mirror of
https://github.com/transmission/transmission
synced 2025-03-11 22:52:53 +00:00
Fixes a race condition
This commit is contained in:
parent
706a2ade11
commit
6ab640c50b
1 changed files with 6 additions and 0 deletions
|
@ -95,6 +95,12 @@ static uint8_t * blockPending( tr_torrent_t * tor, tr_peer_t * peer,
|
|||
|
||||
tr_ioRead( tor->io, r->index, r->begin, r->length, &p[13] );
|
||||
|
||||
if( peer->outRequestCount < 1 )
|
||||
{
|
||||
/* We were choked during the read */
|
||||
return NULL;
|
||||
}
|
||||
|
||||
peer_dbg( "SEND piece %d/%d (%d bytes)",
|
||||
r->index, r->begin, r->length );
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue