mirror of
https://github.com/DrBeef/ioq3quest.git
synced 2024-11-27 14:22:11 +00:00
* Fix Sys_Milliseconds wrapping causing the flood protection code to
malfunction and block all traffic (reported by bubu^)
This commit is contained in:
parent
6516be2fed
commit
ab9b08e584
1 changed files with 2 additions and 1 deletions
|
@ -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 {
|
||||||
|
|
Loading…
Reference in a new issue