-
Notifications
You must be signed in to change notification settings - Fork 105
Closed
Description
Hey Rod,
I'm having problems getting a pipeline to shutdown so my program can exit. It looks like a my through2 pipe is not passing along the end
event of it's readable stream. If I explicitly emit('end')
in the flush function, all goes well:
var objectStreamInspector = through.obj(function(chunk, enc, transformCallback) {
console.dir(chunk);
this.push(chunk);
transformCallback();
}, function flush(flushCallback){
console.log('flushing');
this.push(null);
this.emit('end'); //if I don't do this, even though the input stream ends, this stream won't
flushCallback();
});
It looks to me like transform streams are supposed to emit('end')
after their flush. The stream
(v0.10.33) docs say:
end is fired after all data has been output which is after the callback in _flush has been called.
I might be misunderstanding this.
--Brad Olson
ABS
Metadata
Metadata
Assignees
Labels
No labels