Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions packages/pg/lib/query.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,12 @@ class Query extends EventEmitter {
err = this._canceledDueToError
this._canceledDueToError = false
}
// send sync to unstick the connection after an error during
// a rows-limited (portal suspension) query; without this,
// the server waits for Sync and ReadyForQuery never arrives.
if (this.rows) {
connection.sync()
}
// if callback supplied do not emit error event as uncaught error
// events will bubble up to node process
if (this.callback) {
Expand Down
Loading