Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PassThrough streams (but more importantly Transform streams) never emit an "end" event #33

Closed
TooTallNate opened this issue Nov 23, 2012 · 1 comment

Comments

@TooTallNate
Copy link
Contributor

test case:

var fs = require('fs');
var assert = require('assert');
var PassThrough = require('readable-stream/passthrough');

var p = new PassThrough();
var f = fs.createReadStream(__filename);
var pEnd = false;
var fEnd = false;
f.on('end', function () {
  console.error('f "end" event');
  fEnd = true;
});
p.on('end', function () {
  console.error('p "end" event');
  pEnd = true;
});
process.on('exit', function () {
  assert(fEnd, 'no fs.ReadStream "end" event');
  assert(pEnd, 'no Passthrough "end" event');
});
f.pipe(p);
@TooTallNate
Copy link
Contributor Author

nvm, I'm retarded, there's no consumer on the p end...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant