Zero return value when counter_rate() switches over to next second and
value is positive, but below the limit.
This commit is contained in:
parent
2f02a9e15a
commit
1276a8363c
@ -154,6 +154,8 @@ counter_ratecheck(struct counter_rate *cr, int64_t limit)
|
||||
counter_u64_zero(cr->cr_rate);
|
||||
cr->cr_over = 0;
|
||||
cr->cr_ticks = now;
|
||||
if (val <= limit)
|
||||
val = 0;
|
||||
}
|
||||
atomic_store_rel_int(&cr->cr_lock, 0);
|
||||
} else
|
||||
|
Loading…
x
Reference in New Issue
Block a user