handle situation, when broken copy to query, ends before it is canceled

This commit is contained in:
anton 2013-01-18 14:04:21 +02:00 committed by bmc
parent 8ea2f259ed
commit 7ca21acb25
2 changed files with 6 additions and 0 deletions

View File

@ -64,6 +64,9 @@ p.handleError = function(error) {
}
p.handleReadyForQuery = function(meta) {
if (this._canceledDueToError) {
return this.handleError(this._canceledDueToError);
}
if(meta) {
this._result.addCommandComplete(meta);
}

View File

@ -93,6 +93,9 @@ p.handleCommandComplete = function(msg) {
};
p.handleReadyForQuery = function() {
if (this._canceledDueToError) {
return this.handleError(this._canceledDueToError);
}
if(this.callback) {
this.callback(null, this._result);
}