(msg)
| 366 | } |
| 367 | |
| 368 | _handleReadyForQuery(msg) { |
| 369 | if (this._connecting) { |
| 370 | this._connecting = false |
| 371 | this._connected = true |
| 372 | clearTimeout(this.connectionTimeoutHandle) |
| 373 | |
| 374 | // process possible callback argument to Client#connect |
| 375 | if (this._connectionCallback) { |
| 376 | this._connectionCallback(null, this) |
| 377 | // remove callback for proper error handling |
| 378 | // after the connect event |
| 379 | this._connectionCallback = null |
| 380 | } |
| 381 | this.emit('connect') |
| 382 | } |
| 383 | const activeQuery = this._getActiveQuery() |
| 384 | this._activeQuery = null |
| 385 | this._txStatus = msg?.status ?? null |
| 386 | this.readyForQuery = true |
| 387 | if (activeQuery) { |
| 388 | activeQuery.handleReadyForQuery(this.connection) |
| 389 | } |
| 390 | this._pulseQueryQueue() |
| 391 | } |
| 392 | |
| 393 | // if we receive an error event or error message |
| 394 | // during the connection process we handle it here |
nothing calls this directly
no test coverage detected