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

Stream end event don't been called #139

Closed
herlon214 opened this issue Aug 18, 2015 · 3 comments
Closed

Stream end event don't been called #139

herlon214 opened this issue Aug 18, 2015 · 3 comments

Comments

@herlon214
Copy link

Hi guys, here is the code:

var stream = needle.get(url, {headers: headers, "follow_max": 5, compressed: true}).pipe(out);

    stream.on('end', function() {
      console.log("Done");
    });

The console never show "Done", why?
Thanks in advance.

@tomas
Copy link
Owner

tomas commented Aug 18, 2015

What content type are you downloading? Are you sure there aren't any errors occurring?

@herlon214
Copy link
Author

I fixed putting the pipe on the other line:

var stream = needle.get(url, {headers: headers, "follow_max": 5});
    stream.pipe(out);
    stream.on('end', function() {
      extract();
    });

@tomas
Copy link
Owner

tomas commented Oct 2, 2015

The fix that closes #140 should also take care of this. Can you check again?

@tomas tomas closed this as completed Oct 16, 2015
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

2 participants