From d5169526909829294daf8c2e583287c84ab472f6 Mon Sep 17 00:00:00 2001 From: Carlos Fuentes Date: Mon, 2 Jan 2023 13:58:43 +0100 Subject: [PATCH] refactor: Pool leftover --- lib/pool.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lib/pool.js b/lib/pool.js index e1b181888cc..b2e4fc9cc36 100644 --- a/lib/pool.js +++ b/lib/pool.js @@ -26,7 +26,6 @@ function defaultFactory (origin, opts) { class Pool extends PoolBase { constructor (origin, { factory = defaultFactory, - reset = false, connections, connect, connectTimeout, @@ -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.') } @@ -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