Skip to content

Commit

Permalink
Fix throw in type parsers when in prepared statement (#1242)
Browse files Browse the repository at this point in the history
  • Loading branch information
LinusU authored and brianc committed Mar 9, 2017
1 parent ff5ceb4 commit ce8f215
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ Client.prototype.connect = function(callback) {
self.readyForQuery = true;
self._pulseQueryQueue();
if(activeQuery) {
activeQuery.handleReadyForQuery();
activeQuery.handleReadyForQuery(con);
}
});

Expand Down
4 changes: 2 additions & 2 deletions lib/query.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,9 @@ Query.prototype.handleEmptyQuery = function(con) {
}
};

Query.prototype.handleReadyForQuery = function() {
Query.prototype.handleReadyForQuery = function(con) {
if(this._canceledDueToError) {
return this.handleError(this._canceledDueToError);
return this.handleError(this._canceledDueToError, con);
}
if(this.callback) {
this.callback(null, this._result);
Expand Down

0 comments on commit ce8f215

Please sign in to comment.