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

Readable stream gets called infinitely? #76

Closed
jmcbee opened this Issue Dec 14, 2014 · 2 comments

Comments

Projects
None yet
2 participants
@jmcbee

jmcbee commented Dec 14, 2014

Hi, forgive me for my noobness. I am trying to figure out, what is happening? I created a readable stream and it gets called infinitely.

es.readable(function(count, next) {
  next(null, 'hello world');
}).pipe(es.log('test'));

Why does it do that?

@dominictarr

This comment has been minimized.

Owner

dominictarr commented Dec 14, 2014

you need to do this.emit('end') at some point, it's documented.
https://github.com/dominictarr/event-stream/#readable-asyncfunction

@jmcbee

This comment has been minimized.

jmcbee commented Dec 21, 2014

Thanks!

@jmcbee jmcbee closed this Dec 21, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment