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

When we listen to the data event, the end event emitted after we paused the stream #69

Closed
NeverI opened this issue Oct 6, 2014 · 3 comments

Comments

@NeverI
Copy link

NeverI commented Oct 6, 2014

Example

var path = 'test.csv'
var csvstream = require('fast-csv')
  .fromPath(path)
  .on("data", function(data){
    csvstream.pause();
    console.log("Shouldn't see this more than once");
  })
  .on("end", function(data){
    console.log("Shouldn't see this");
  });

This is works properly when we listen the record event insted of data

@doug-martin
Copy link
Contributor

what version of node and fast-csv are you using?

doug-martin added a commit to doug-martin/fast-csv that referenced this issue Oct 21, 2014
* Fixed issues with v0.11 stream implementation C2FO#73
* Fixed issues with pause/resume and data events in v0.10 C2FO#69
* Fixed the double invoking of done callback when parsing files C2FO#68
* Refactored tests
@doug-martin doug-martin mentioned this issue Oct 21, 2014
@doug-martin
Copy link
Contributor

I did not have tests covering pause/resume with data events and it was broken... I fixed this in v0.5.3 so pause/resume should work as expected!

-Doug

@NeverI
Copy link
Author

NeverI commented Oct 21, 2014

Thanks!

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