Skip to content

Fix UserTimeout on macos #599

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

Merged
merged 1 commit into from
Jan 14, 2025
Merged

Conversation

christopherm99
Copy link
Contributor

Uses TCP_CONNECTIONTIMEOUT if TCP_USER_TIMEOUT cannot be found.

@kazu-yamamoto kazu-yamamoto self-assigned this Jan 14, 2025
@kazu-yamamoto kazu-yamamoto self-requested a review January 14, 2025 05:54
Copy link
Collaborator

@kazu-yamamoto kazu-yamamoto left a comment

Choose a reason for hiding this comment

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

Nice catch!

@kazu-yamamoto kazu-yamamoto merged commit 412cb41 into haskell:master Jan 14, 2025
10 checks passed
@kazu-yamamoto
Copy link
Collaborator

I have merged this PR.
Thanks you for your contribution!

@christopherm99 christopherm99 deleted the mac-timeout branch January 14, 2025 18:46
@christopherm99
Copy link
Contributor Author

In retrospect, this probably should be a new SocketOption. TCP_USER_TIMEOUT is measured in milliseconds, but TCP_CONNECTIONTIMEOUT is measured in seconds. TCP_CONNECTIONTIMEOUT seems like it instead should be the macos version of FreeBSD's TCP_KEEPINIT.

kazu-yamamoto added a commit that referenced this pull request Jan 28, 2025
Revert #599 and add new SocketOption `KeepInit`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants