MCPcopy Index your code
hub / github.com/brianc/node-postgres / _handleErrorWhileConnecting

Method _handleErrorWhileConnecting

packages/pg/lib/client.js:395–406  ·  view source on GitHub ↗
(err)

Source from the content-addressed store, hash-verified

393 // if we receive an error event or error message
394 // during the connection process we handle it here
395 _handleErrorWhileConnecting(err) {
396 if (this._connectionError) {
397 // TODO(bmc): this is swallowing errors - we shouldn't do this
398 return
399 }
400 this._connectionError = true
401 clearTimeout(this.connectionTimeoutHandle)
402 if (this._connectionCallback) {
403 return this._connectionCallback(err)
404 }
405 this.emit('error', err)
406 }
407
408 // if we're connected and we receive an error event from the connection
409 // this means the socket is dead - do a hard abort of all queries and emit

Callers 2

_handleErrorEventMethod · 0.95
_handleErrorMessageMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected