Skip to content

Stream is not closed when the receiver is closed #239

@mrmlnc

Description

@mrmlnc

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;
    }
})();

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions