* Fix Sys_Milliseconds wrapping causing the flood protection code to

malfunction and block all traffic (reported by bubu^)
This commit is contained in:
Tim Angus 2011-02-18 23:46:02 +00:00
parent 6516be2fed
commit ab9b08e584

View file

@ -444,7 +444,8 @@ static leakyBucket_t *SVC_BucketForAddress( netadr_t address, int burst, int per
interval = now - bucket->lastTime; interval = now - bucket->lastTime;
// Reclaim expired buckets // Reclaim expired buckets
if ( bucket->lastTime > 0 && interval > ( burst * period ) ) { if ( bucket->lastTime > 0 && ( interval > ( burst * period ) ||
interval < 0 ) ) {
if ( bucket->prev != NULL ) { if ( bucket->prev != NULL ) {
bucket->prev->next = bucket->next; bucket->prev->next = bucket->next;
} else { } else {