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

fs.WriteStream close listener not called #15955

Open
du33169 opened this issue Dec 23, 2024 · 0 comments
Open

fs.WriteStream close listener not called #15955

du33169 opened this issue Dec 23, 2024 · 0 comments
Labels
bug Something isn't working needs triage

Comments

@du33169
Copy link

du33169 commented Dec 23, 2024

What version of Bun is running?

1.1.42

What platform is your computer?

Microsoft Windows NT 10.0.19045.0 x64

What steps can reproduce the bug?

(install bun)

Save as test.js:

import { createWriteStream } from "fs";

const stream = createWriteStream("a.txt");
const buffer = Buffer.from("Hello, world!");
stream.write(buffer, () => {
	stream.end(); 
});

stream.addListener("close", () => {
	console.log("close listener called");
});
console.log("close");

Run:

bun run test.js

What is the expected behavior?

close
close listener called

(node.js)

What do you see instead?

close

(bun)

Additional information

Probably related: #4241, #6058

@du33169 du33169 added bug Something isn't working needs triage labels Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage
Projects
None yet
Development

No branches or pull requests

1 participant