-
-
Notifications
You must be signed in to change notification settings - Fork 90
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
Don't use SO_REUSEADDR on Windows #53
Conversation
On Windows the SO_REUSEADDR sockopt has different semantics, so we don't want to enable it there. See https://msdn.microsoft.com/en-us/library/ms740621(v=vs.85).aspx Fixes cherrypy/cherrypy#1088 Signed-off-by: Johannes Löthberg <johannes@kyriasis.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.
Would you please add a reference to the reason of doing this in comments?
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
Codecov Report
@@ Coverage Diff @@
## master #53 +/- ##
==========================================
- Coverage 58.98% 58.87% -0.11%
==========================================
Files 18 18
Lines 3279 3280 +1
==========================================
- Hits 1934 1931 -3
- Misses 1345 1349 +4 |
Do you want me to add the msdn link as well? And should I squash the two commits? |
Yeah, it would be nice to have that link and maybe some test. Don't squash commits. |
Not sure what kind of test you were thinking? Try to bind an instance, and checking if the sockopt is set would work I guess, but it doesn't feel like that would be a very useful test, hm. |
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
Well, I'll accept this PR without additional test for now. Just wanted to hear your suggestions. |
@kyrias thank you! |
Bug fix(?)
#
)cherrypy/cherrypy#1088
To bind using SO_REUSEADDR on all platforms
To not bind using SO_REUSEADDR on Windows.
https://msdn.microsoft.com/en-us/library/ms740621(v=vs.85).aspx