Changeset 2498


Ignore:
Timestamp:
Jul 25, 2007, 6:30:00 PM (15 years ago)
Author:
charles
Message:

fix endgame bug reported again and again and again by SoftwareElves? ;)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/peer.c

    r2497 r2498  
    694694                const int end = firstBlock + n;
    695695                int block;
    696                 for( block=firstBlock; block<end; ++block )
     696                for( block=firstBlock; openSlots>0 && block<end; ++block )
    697697                {
    698698                    /* don't ask for it if we've already got it */
     
    716716        tr_free( pool );
    717717    }
     718
     719    assert( peer->inRequestCount <= peer->inRequestMax );
     720    assert( peer->inRequestMax <= peer->inRequestAlloc );
    718721
    719722    return TR_OK;
Note: See TracChangeset for help on using the changeset viewer.