From d05c592dbae6c29b8af2c6f113ffa9467190a28c Mon Sep 17 00:00:00 2001 From: Daniel Reus Date: Sun, 13 Dec 2020 05:43:29 +0100 Subject: [PATCH] Apply fix for #60 and #61 --- lib/ConnectionManager.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/ConnectionManager.js b/lib/ConnectionManager.js index 51ab57e..b32028f 100644 --- a/lib/ConnectionManager.js +++ b/lib/ConnectionManager.js @@ -214,6 +214,10 @@ ConnectionManager.prototype.getSessionTimeout = function () { ConnectionManager.prototype.connect = function () { var self = this; + if (self.state === STATES.CLOSING) { + return; + } + self.setState(STATES.CONNECTING); self.findNextServer(function (server) {