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
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=310032
@ -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…
Reference in New Issue
Block a user