We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3f8ba76 commit ed88cf6Copy full SHA for ed88cf6
packages/gaussdb-node/lib/client.js
@@ -345,9 +345,17 @@ class Client extends EventEmitter {
345
return
346
}
347
this._connectionError = true
348
+ this._connecting = false
349
clearTimeout(this.connectionTimeoutHandle)
350
+
351
+ if (this.connection && this.connection.stream) {
352
+ this.connection.stream.destroy()
353
+ }
354
355
if (this._connectionCallback) {
- return this._connectionCallback(err)
356
+ const callback = this._connectionCallback
357
+ this._connectionCallback = null
358
+ return callback(err)
359
360
this.emit('error', err)
361
0 commit comments