diff --git a/pack.js b/pack.js index 60a5752..279f90b 100644 --- a/pack.js +++ b/pack.js @@ -85,11 +85,11 @@ Pack.prototype.entry = function(header, buffer, callback) { return; } - this._encode(header); - this._stream = new PassThrough(); - var sink = new Sink(this); + this._encode(header); + this._stream = sink; + eos(sink, function(err) { self._stream = null;