Skip to content

Commit fd6621b

Browse files
authored
fix: parseComplete
1 parent d994000 commit fd6621b

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

packages/pg/lib/client.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -490,6 +490,11 @@ class Client extends EventEmitter {
490490
_handleParseComplete() {
491491
const activeQuery = this._getCurrentQuery()
492492
if (activeQuery == null) {
493+
// In pipeline mode, parseComplete might be received before queries are fully processed
494+
// This is normal behavior, so we can safely ignore it
495+
if (this._pipelining) {
496+
return
497+
}
493498
const error = new Error('Received unexpected parseComplete message from backend.')
494499
this._handleErrorEvent(error)
495500
return

0 commit comments

Comments
 (0)