mirror of
https://github.com/brianc/node-postgres.git
synced 2025-12-08 20:16:25 +00:00
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:
parent
8f56b8c2fd
commit
b03a3bd76d
@ -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) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user