Fix issue #54: end is being triggered 2 times

This commit is contained in:
jeromew 2016-07-29 23:50:09 +00:00
parent ade7ab95a0
commit 7003f6070f

View File

@ -62,8 +62,9 @@ CopyStreamQuery.prototype.handleCommandComplete = function(msg) {
this.rowCount = parseInt(match[1], 10) this.rowCount = parseInt(match[1], 10)
} }
this.unpipe() // unpipe from connection
this.emit('end') this.unpipe(this.connection)
this.connection = null
} }
CopyStreamQuery.prototype.handleReadyForQuery = function() { CopyStreamQuery.prototype.handleReadyForQuery = function() {