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

fix(ext/node): delay accept() call 2 ticks in net.Server#listen #25481

Merged
merged 2 commits into from
Sep 8, 2024

Conversation

kt3k
Copy link
Member

@kt3k kt3k commented Sep 6, 2024

A workaround for the issue #25480

Deno.Listener can't be closed synchronously after accept() is called. This PR delays the accept call 2 ticks (The listener callback is called 1 tick later. So the 1 tick delay is not enough), and makes net.Server capable of being closed synchronously.

This unblocks npm:detect-port and npm:portfinder

closes #18301
closes #25175

@kt3k kt3k added the ci-draft Run the CI on draft PRs. label Sep 6, 2024
@kt3k kt3k marked this pull request as ready for review September 6, 2024 08:29
Copy link
Member

@satyarohith satyarohith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - nice test!

@kt3k kt3k merged commit ce1d668 into denoland:main Sep 8, 2024
33 checks passed
@kt3k kt3k deleted the workaround-delay-net-server-accept-2-ticks branch September 8, 2024 03:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci-draft Run the CI on draft PRs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: detect-port throwing address in use error node: Error when using npm:portfinder
4 participants