Skip to content

Commit

Permalink
fix: ensure to check for Infinity in checkMaxLimit function (#1666)
Browse files Browse the repository at this point in the history
Co-authored-by: chad <chad.nehemiah94@gmail.com>
  • Loading branch information
SgtPooki and maschad authored Apr 3, 2023
1 parent f4c99d9 commit 00a7783
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/connection-manager/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -583,6 +583,10 @@ export class DefaultConnectionManager extends EventEmitter<ConnectionManagerEven
log.trace('limit %s was not set so it cannot be applied', name)
return
}
if (limit === Infinity) {
log.trace('limit %s is Infinity so it cannot be applied', name)
return
}

log.trace('checking limit of %s. current value: %d of %d', name, value, limit)
if (value > limit) {
Expand Down

0 comments on commit 00a7783

Please sign in to comment.