Remove unused var buffer_sent

This commit is contained in:
Rafa de la Torre 2018-06-11 12:17:39 +02:00
parent 922627daaf
commit fd3cc95573

View File

@ -44,12 +44,10 @@ CopyStreamQuery.prototype._transform = function(chunk, enc, cb) {
var buffer = Buffer.alloc(chunk.length); var buffer = Buffer.alloc(chunk.length);
var buffer_offset = 0; var buffer_offset = 0;
var buffer_sent = false;
this.pushBufferIfneeded = function() { this.pushBufferIfneeded = function() {
if(needPush && !buffer_sent && buffer_offset > 0) { if (needPush && buffer_offset > 0) {
this.push(buffer.slice(0, buffer_offset)) this.push(buffer.slice(0, buffer_offset))
buffer_sent = true;
buffer_offset = 0; buffer_offset = 0;
} }
} }