File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -471,6 +471,11 @@ class Client extends EventEmitter {
471471 _handleCommandComplete ( msg ) {
472472 const query = this . _getCurrentQuery ( )
473473 if ( query == null ) {
474+ // In pipeline mode, commandComplete might be received after query is processed
475+ // This can happen due to message timing, so we can safely ignore it
476+ if ( this . _pipelining ) {
477+ return
478+ }
474479 const error = new Error ( 'Received unexpected commandComplete message from backend.' )
475480 this . _handleErrorEvent ( error )
476481 return
Original file line number Diff line number Diff line change @@ -280,11 +280,7 @@ class Query extends EventEmitter {
280280 rows : this . rows ,
281281 } )
282282
283- if ( ! this . rows ) {
284- connection . pipelineSync ( )
285- } else {
286- connection . flush ( )
287- }
283+ connection . flush ( )
288284 }
289285}
290286
You can’t perform that action at this time.
0 commit comments