Skip to content

Commit

Permalink
refactor: Pool leftover
Browse files Browse the repository at this point in the history
  • Loading branch information
metcoder95 committed Jan 2, 2023
1 parent ae04e7d commit d516952
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions lib/pool.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ function defaultFactory (origin, opts) {
class Pool extends PoolBase {
constructor (origin, {
factory = defaultFactory,
reset = false,
connections,
connect,
connectTimeout,
Expand All @@ -41,10 +40,6 @@ class Pool extends PoolBase {
throw new InvalidArgumentError('invalid connections')
}

if (reset != null && reset.constructor !== Boolean) {
throw new InvalidArgumentError('reset must be a boolean')
}

if (typeof factory !== 'function') {
throw new InvalidArgumentError('factory must be a function.')
}
Expand All @@ -68,7 +63,7 @@ class Pool extends PoolBase {
: []
this[kConnections] = connections || null
this[kUrl] = util.parseOrigin(origin)
this[kOptions] = { ...util.deepClone(options), reset, connect }
this[kOptions] = { ...util.deepClone(options), connect }
this[kOptions].interceptors = options.interceptors
? { ...options.interceptors }
: undefined
Expand Down

0 comments on commit d516952

Please sign in to comment.