File tree 2 files changed +4
-2
lines changed 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -111,7 +111,9 @@ p.connect = function(callback) {
111
111
con . on ( 'copyOutResponse' , function ( msg ) {
112
112
if ( self . activeQuery . stream === undefined ) {
113
113
self . activeQuery . _canceledDueToError = new Error ( 'No destination stream defined' ) ;
114
- ( new self . constructor ( self . config ) ) . cancel ( self , self . activeQuery ) ;
114
+ //canceling query requires creation of new connection
115
+ //look for postgres frontend/backend protocol
116
+ ( new self . constructor ( { port : self . port , host : self . host } ) ) . cancel ( self , self . activeQuery ) ;
115
117
}
116
118
} ) ;
117
119
con . on ( 'copyData' , function ( msg ) {
Original file line number Diff line number Diff line change @@ -203,7 +203,7 @@ var clientBuilder = function(config) {
203
203
connection . on ( 'copyOutResponse' , function ( msg ) {
204
204
if ( connection . _activeQuery . stream === undefined ) {
205
205
connection . _activeQuery . _canceledDueToError = new Error ( 'No destination stream defined' ) ;
206
- ( new clientBuilder ( connection . config ) ) . cancel ( connection , connection . _activeQuery ) ;
206
+ ( new clientBuilder ( { port : connection . port , host : connection . host } ) ) . cancel ( connection , connection . _activeQuery ) ;
207
207
}
208
208
} ) ;
209
209
connection . on ( 'copyData' , function ( chunk ) {
You can’t perform that action at this time.
0 commit comments