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 is not closed when the receiver is closed #239

Closed
mrmlnc opened this issue Nov 8, 2019 · 3 comments
Closed

Stream is not closed when the receiver is closed #239

mrmlnc opened this issue Nov 8, 2019 · 3 comments
Milestone

Comments

@mrmlnc
Copy link
Owner

mrmlnc commented Nov 8, 2019

Environment

  • OS Version: Windows 10
  • Node.js Version: 12

Actual behavior

The fast-glob package will read directories in the stream, even after the receiver is closed.

Expected behavior

When the receiver is closed, the read stream for each of patterns must be closed too.

Code sample

const fg = require('fast-glob');

(async () => {
    const stream = fg.stream('../DefinitelyTyped/**/*.md');

    for await (const entry of stream) {
        console.dir(entry, { colors: true });

        return;
    }
})();
@mrmlnc
Copy link
Owner Author

mrmlnc commented Nov 8, 2019

Original issue:

#238 (comment)

@mrmlnc
Copy link
Owner Author

mrmlnc commented Nov 8, 2019

How to test it?

Just add console.log before emit to destination stream here.

@mrmlnc
Copy link
Owner Author

mrmlnc commented Nov 24, 2019

Will be fixed with #242.

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

No branches or pull requests

1 participant