-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Add stub/wrapper for reuseport.Listen on Windows platforms #638
Conversation
Co-Authored-By: Erik Dubbelboer <erik@dubbelboer.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you 100% sure this is required. This pull request here says it's not needed in Go 1.12 anymore: valyala/tcplisten#2
I saw that however I don't know what that comment is based on as the Go 1.12 release notes don't mention any new support/changes in "net" that could make this work now and my Windows Go 1.12 install fails the same way as noted in that PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, 2 last modifications and then this can be merged.
Thanks! |
This PR adds a "stub" Listen function for Windows only that always returns (*reuseport.ErrNoReusePort) so the same code can be used on Windows and non-Windows platforms.
So in this case the following code will work on Windows as well as Linux/BSD platforms