From b03a3bd76d78963efc93119b5f583bbc22b9caa6 Mon Sep 17 00:00:00 2001 From: Adam Nielsen Date: Fri, 13 Dec 2019 02:15:19 +1000 Subject: [PATCH] Clear connection timeout on error (#2015) Cancel the connection timeout upon stream error, to avoid getting a stream error followed later by a connection error. --- lib/client.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/client.js b/lib/client.js index cca5e66e..370630a0 100644 --- a/lib/client.js +++ b/lib/client.js @@ -251,6 +251,7 @@ Client.prototype._connect = function (callback) { ? new Error('Connection terminated') : new Error('Connection terminated unexpectedly') + clearTimeout(connectionTimeoutHandle) this._errorAllQueries(error) if (!this._ending) {