Skip to content

Commit b03a3bd

Browse files
adam-nielsenbrianc
authored andcommitted
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.
1 parent 8f56b8c commit b03a3bd

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Diff for: lib/client.js

+1
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,7 @@ Client.prototype._connect = function (callback) {
251251
? new Error('Connection terminated')
252252
: new Error('Connection terminated unexpectedly')
253253

254+
clearTimeout(connectionTimeoutHandle)
254255
this._errorAllQueries(error)
255256

256257
if (!this._ending) {

0 commit comments

Comments
 (0)