From fe92c065771c728bfeedc475bf50f76e02e06b0e Mon Sep 17 00:00:00 2001 From: Oleg Kaplun Date: Tue, 5 Feb 2019 18:09:03 +0200 Subject: [PATCH 1/2] fix for cases where connection is broken and release() is called, avoid returning the broken connection to the idle pool --- index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/index.js b/index.js index cfe377c..8c26b71 100644 --- a/index.js +++ b/index.js @@ -45,7 +45,9 @@ function release (client, err) { }, this.options.idleTimeoutMillis) } + if (this._clients.indexOf(client) > -1) { this._idle.push(new IdleItem(client, tid)) + } this._pulseQueue() } From f40937dc96045de0a019cac04482102f630b315c Mon Sep 17 00:00:00 2001 From: Oleg Kaplun Date: Wed, 6 Feb 2019 13:01:20 +0200 Subject: [PATCH 2/2] indentatin fix --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 8c26b71..d516322 100644 --- a/index.js +++ b/index.js @@ -46,7 +46,7 @@ function release (client, err) { } if (this._clients.indexOf(client) > -1) { - this._idle.push(new IdleItem(client, tid)) + this._idle.push(new IdleItem(client, tid)) } this._pulseQueue() }