Recover if the randomly-assigned port is already in use #1688

Closed
opened 2025-08-09 17:21:30 +00:00 by fergalmoran · 0 comments
Owner

Originally created by @SteveSandersonMS on 11/17/2015

The out-of-process Node host opens a server on port zero, which means "let Node or the OS decide". AFAIK this is implemented inside Node as "pick a random port without checking whether it's in use or not". Ideally, if the randomly-chosen port is in use, we should keep retrying until we get an available port.

*Originally created by @SteveSandersonMS on 11/17/2015* The out-of-process Node host opens a server on port zero, which means "let Node or the OS decide". AFAIK this is implemented inside Node as "pick a random port without checking whether it's in use or not". Ideally, if the randomly-chosen port is in use, we should keep retrying until we get an available port.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/JavaScriptServices#1688
No description provided.