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

Control implementations don't do error handling correctly #101

Closed
anacrolix opened this issue Apr 21, 2023 · 1 comment · Fixed by #102
Closed

Control implementations don't do error handling correctly #101

anacrolix opened this issue Apr 21, 2023 · 1 comment · Fixed by #102

Comments

@anacrolix
Copy link
Contributor

The windows implementation clobbers the error returned from SetsockoptInt with the result of the Control method call.

return c.Control(func(fd uintptr) {

The unix implementation doesn't handle the error returned from the Control method call at all.

c.Control(func(fd uintptr) {

@marten-seemann
Copy link
Contributor

Want to submit a patch?

anacrolix added a commit to anacrolix/go-reuseport that referenced this issue Apr 25, 2023
Both sockopt and control errors can't exist at the same time, but control errors should occur first, and so are given precedence.

Fixes libp2p#101
marten-seemann pushed a commit that referenced this issue Apr 25, 2023
Both sockopt and control errors can't exist at the same time, but control errors should occur first, and so are given precedence.

Fixes #101
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 a pull request may close this issue.

2 participants