From aa30f9cc1ec01004d5443f9cd4e4a084b542847f Mon Sep 17 00:00:00 2001 From: Adam Nielsen Date: Thu, 28 Nov 2019 20:53:12 +1000 Subject: [PATCH] Clear connection timeout on error 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 cca5e66e8..370630a02 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) {