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.
This commit is contained in:
Adam Nielsen 2019-12-13 02:15:19 +10:00 committed by Brian C
parent 8f56b8c2fd
commit b03a3bd76d

View File

@ -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) {