Skip to content

Commit

Permalink
emit 'close' and end stream on errors
Browse files Browse the repository at this point in the history
  • Loading branch information
grncdr committed Dec 26, 2013
1 parent 152603b commit 9614060
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions index.js
Expand Up @@ -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)
}

0 comments on commit 9614060

Please sign in to comment.