mirror of
https://github.com/brianc/node-postgres.git
synced 2026-02-01 16:47:23 +00:00
handle situation, when broken copy to query, ends before it is canceled
This commit is contained in:
parent
8ea2f259ed
commit
7ca21acb25
@ -64,6 +64,9 @@ p.handleError = function(error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
p.handleReadyForQuery = function(meta) {
|
p.handleReadyForQuery = function(meta) {
|
||||||
|
if (this._canceledDueToError) {
|
||||||
|
return this.handleError(this._canceledDueToError);
|
||||||
|
}
|
||||||
if(meta) {
|
if(meta) {
|
||||||
this._result.addCommandComplete(meta);
|
this._result.addCommandComplete(meta);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -93,6 +93,9 @@ p.handleCommandComplete = function(msg) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
p.handleReadyForQuery = function() {
|
p.handleReadyForQuery = function() {
|
||||||
|
if (this._canceledDueToError) {
|
||||||
|
return this.handleError(this._canceledDueToError);
|
||||||
|
}
|
||||||
if(this.callback) {
|
if(this.callback) {
|
||||||
this.callback(null, this._result);
|
this.callback(null, this._result);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user