diff --git a/index.js b/index.js index 8b49e19..b0a4a05 100644 --- a/index.js +++ b/index.js @@ -68,3 +68,9 @@ PostgresQuery.prototype.handleReadyForQuery = function () { this.emit('close') QueryStream.prototype.handleReadyForQuery.call(this) } + +PostgresQuery.prototype.handleError = function (err) { + this.emit('close') + this.push(null) + QueryStream.prototype.handleError.call(this, err) +}