Skip to content

Commit ce8f215

Browse files
LinusUbrianc
authored andcommitted
Fix throw in type parsers when in prepared statement (brianc#1242)
1 parent ff5ceb4 commit ce8f215

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/client.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ Client.prototype.connect = function(callback) {
169169
self.readyForQuery = true;
170170
self._pulseQueryQueue();
171171
if(activeQuery) {
172-
activeQuery.handleReadyForQuery();
172+
activeQuery.handleReadyForQuery(con);
173173
}
174174
});
175175

lib/query.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,9 @@ Query.prototype.handleEmptyQuery = function(con) {
116116
}
117117
};
118118

119-
Query.prototype.handleReadyForQuery = function() {
119+
Query.prototype.handleReadyForQuery = function(con) {
120120
if(this._canceledDueToError) {
121-
return this.handleError(this._canceledDueToError);
121+
return this.handleError(this._canceledDueToError, con);
122122
}
123123
if(this.callback) {
124124
this.callback(null, this._result);

0 commit comments

Comments
 (0)