Merge branch 'diffbot-testing' into testing
This commit is contained in:
@ -934,9 +934,24 @@ void handleRequest54 ( UdpSlot *udpSlot , int32_t niceness ) {
|
||||
// and the loadbucket id
|
||||
//*(int32_t *)p = bb.m_id; p += 4;
|
||||
|
||||
// with dup keys we end up with long chains of crap and this
|
||||
// takes forever. so just flush the whole thing every 2 minutes or
|
||||
// when 100000 entries are in there
|
||||
static time_t s_lastTime = 0;
|
||||
time_t now = nowms / 1000;
|
||||
if ( now - s_lastTime > 120 || s_loadTable.getNumSlots() > 100000 ) {
|
||||
log("sproxy: flushing %i entries from proxy loadtable",
|
||||
(int)s_loadTable.m_numSlotsUsed);
|
||||
s_loadTable.clear();
|
||||
// only do this one per minute
|
||||
s_lastTime = now;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
MDW: take this out since it was freezing things up
|
||||
int32_t sanityCount = 0;//s_loadTable.getNumSlots();
|
||||
// top:
|
||||
|
||||
// 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 = s_loadTable.getNumSlots() - 1 ; i >= 0 ; i-- ) {
|
||||
@ -964,6 +979,7 @@ void handleRequest54 ( UdpSlot *udpSlot , int32_t niceness ) {
|
||||
//i--;
|
||||
//goto top;
|
||||
}
|
||||
*/
|
||||
|
||||
// send the proxy ip/port/LBid back to user
|
||||
g_udpServer.sendReply_ass ( udpSlot->m_tmpBuf , // msg
|
||||
|
Reference in New Issue
Block a user