diff --git a/lib/parse.js b/lib/parse.js index 0921f4a..98f18bd 100644 --- a/lib/parse.js +++ b/lib/parse.js @@ -20,10 +20,7 @@ function Parse(opts) { self._opts = opts || { verbose: false }; PullStream.call(self, self._opts); - self.on('finish', function() { - self.emit('end'); - self.emit('close'); - }); + self._readRecord().catch(function(e) { if (!self.__emittedError || self.__emittedError !== e) self.emit('error', e);