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 TCPSocket#tcp_keepalive_idle on Windows #13364

Conversation

HertzDevil
Copy link
Contributor

The existing code always raises WSAENOPROTOOPT because the wrong level is passed to getsockopt or setsockopt. It is also incorrect as it is a boolean option that is already exposed via Socket#keepalive?.

Note that this option (and #system_tcp_keepalive_interval) are only supported on Windows 10 version 1709 or above.

@straight-shoota straight-shoota added this to the 1.9.0 milestone Apr 20, 2023
@straight-shoota straight-shoota merged commit 20594b7 into crystal-lang:master Apr 21, 2023
@HertzDevil HertzDevil deleted the bug/windows-tcp-socket-tcp_keepalive_idle branch April 21, 2023 16:30
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants