From 12973239c187dd3a082242d959a062ac19f6326e Mon Sep 17 00:00:00 2001 From: Mathias Buus Date: Thu, 3 Apr 2014 02:28:41 +0200 Subject: [PATCH] this._stream should be set to sink (in reference to #13) --- pack.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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;