Use end stream option instead of not calling _flush callback (#44)

This commit is contained in:
jeromew
2016-07-26 14:39:33 -05:00
committed by Brian C
parent e0aa7db324
commit ee84aba89f
+2 -3
View File
@@ -45,8 +45,7 @@ CopyStreamQuery.prototype._transform = function(chunk, enc, cb) {
CopyStreamQuery.prototype._flush = function(cb) { CopyStreamQuery.prototype._flush = function(cb) {
var finBuffer = Buffer([code.c, 0, 0, 0, 4]) var finBuffer = Buffer([code.c, 0, 0, 0, 4])
this.push(finBuffer) this.push(finBuffer)
//never call this callback, do not close underlying stream cb()
//cb()
} }
CopyStreamQuery.prototype.handleError = function(e) { CopyStreamQuery.prototype.handleError = function(e) {
@@ -54,7 +53,7 @@ CopyStreamQuery.prototype.handleError = function(e) {
} }
CopyStreamQuery.prototype.handleCopyInResponse = function(connection) { CopyStreamQuery.prototype.handleCopyInResponse = function(connection) {
this.pipe(connection.stream) this.pipe(connection.stream, { end: false })
} }
CopyStreamQuery.prototype.handleCommandComplete = function(msg) { CopyStreamQuery.prototype.handleCommandComplete = function(msg) {