fix NaN from extremely high rate limits
This commit is contained in:
parent
2781f53d6b
commit
a7a1edc92e
2 changed files with 15 additions and 1 deletions
|
|
@ -155,7 +155,7 @@ export class SkRateLimiterService {
|
|||
type: 'bucket',
|
||||
key: limit.key,
|
||||
size: limit.max,
|
||||
dripRate: Math.round(limit.duration / limit.max),
|
||||
dripRate: Math.max(Math.round(limit.duration / limit.max), 1),
|
||||
}, actor, factor),
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue