-
-
Notifications
You must be signed in to change notification settings - Fork 17
Closed
Description
So, I've got impression that we need to do the same fix as in the original orchestrator as discussed here: robrich/orchestrator#48 (comment)
Here is a simple reproduce scenario:
var Readable = require('stream').Readable;
var through = require('through2');
var asyncDone = require('async-done');
var rs = new Readable({objectMode: true});
var c = 0;
rs._read = function () {
if (c++ < 100) {
rs.push(c);
} else {
rs.push(null);
}
};
asyncDone(function(){
return rs.pipe(through.obj(function (chunk, enc, cb) {
console.log(chunk);
this.push(chunk);
cb();
}));
}, function(err, result){
console.log(err, result);
});In this scenario the node process will terminate after reading 16 items.
Now that we've got stream-consume as a separate module a fix would be trivial, happy to send a PR if this makes sense.
Metadata
Metadata
Assignees
Labels
No labels