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

windows: stopping a http server keeps process alive forever #8742

Closed
paperdave opened this issue Feb 7, 2024 · 1 comment
Closed

windows: stopping a http server keeps process alive forever #8742

paperdave opened this issue Feb 7, 2024 · 1 comment
Labels
bug Something isn't working windows An issue that only occurs on Windows

Comments

@paperdave
Copy link
Collaborator

What version of Bun is running?

No response

What platform is your computer?

No response

What steps can reproduce the bug?

import { serve } from "bun";
const server = serve({
  fetch() {
    return new Response("Hello world");
  },
  port: 0,
});
const res = await fetch(`http://${server.hostname}:${server.port}`);
if (res.status !== 200) throw "fail from server";
if ((await res.text()) !== "Hello world") throw "fail from server";
server.stop();
console.log("ok");

What is the expected behavior?

No response

What do you see instead?

No response

Additional information

No response

@paperdave paperdave added bug Something isn't working windows An issue that only occurs on Windows labels Feb 7, 2024
@ghiscoding
Copy link

I'm not sure if it's related or not but this reminds me of Lerna issue that was only observed on Windows and was caused by a child process missing option and just adding windowsHide: false to execa child_process (in this PR) fixed the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working windows An issue that only occurs on Windows
Projects
None yet
Development

No branches or pull requests

2 participants