inf loop fix

This commit is contained in:
Matt Wells
2015-09-12 07:11:39 -07:00
parent d0055cda6b
commit 782bc9cdee

@ -927,9 +927,12 @@ void handleRequest54 ( UdpSlot *udpSlot , int32_t niceness ) {
// and the loadbucket id
//*(int32_t *)p = bb.m_id; p += 4;
int32_t sanityCount = s_loadTable.getNumSlots();
// now remove old entries from the load table. entries that
// have completed and have a download end time more than 10 mins ago
for ( int32_t i = 0 ; i < s_loadTable.getNumSlots() ; i++ ) {
if ( sanityCount-- < 0 ) break;
// skip if empty
if ( ! s_loadTable.m_flags[i] ) continue;
// get the bucket