Fix throw in type parsers when in prepared statement (#1242)

This commit is contained in:
Linus Unnebäck 2017-03-09 22:05:26 +01:00 committed by Brian C
parent ff5ceb4304
commit ce8f215c88
2 changed files with 3 additions and 3 deletions

View File

@ -169,7 +169,7 @@ Client.prototype.connect = function(callback) {
self.readyForQuery = true; self.readyForQuery = true;
self._pulseQueryQueue(); self._pulseQueryQueue();
if(activeQuery) { if(activeQuery) {
activeQuery.handleReadyForQuery(); activeQuery.handleReadyForQuery(con);
} }
}); });

View File

@ -116,9 +116,9 @@ Query.prototype.handleEmptyQuery = function(con) {
} }
}; };
Query.prototype.handleReadyForQuery = function() { Query.prototype.handleReadyForQuery = function(con) {
if(this._canceledDueToError) { if(this._canceledDueToError) {
return this.handleError(this._canceledDueToError); return this.handleError(this._canceledDueToError, con);
} }
if(this.callback) { if(this.callback) {
this.callback(null, this._result); this.callback(null, this._result);