-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Implement Socket#reuse_port
on Windows
#13326
Conversation
Does this PR unblock the following spec? crystal/spec/std/http/server/server_spec.cr Lines 84 to 93 in 14bfa99
Also this error shows up on CI:
|
@HertzDevil in regards to the error
it looks like my It should also unblock that http server spec |
Yeah |
needed |
reuse_port
(=reuse_address
) on Windows
reuse_port
(=reuse_address
) on WindowsSocket#reuse_port
on Windows
I think this is a better solution than having runtime errors on windows and having to write code like this for multi-platform support
noting that windows SO_REUSEADDR == linux SO_REUSEPORT
and on windows, reuse of the address component of a binding is always allowed
I've also changed the socket defaults to use
SO_EXCLUSIVEADDRUSE
as per the docs: