-
Notifications
You must be signed in to change notification settings - Fork 941
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 edge slow shutdown on Windows #1121
Conversation
Codecov ReportAttention:
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## dev #1121 +/- ##
==========================================
- Coverage 21.58% 21.47% -0.12%
==========================================
Files 46 46
Lines 8991 9038 +47
==========================================
Hits 1941 1941
- Misses 7050 7097 +47 ☔ View full report in Codecov by Sentry. |
This is quite an invasive change. I would like to see less ifdefs and specific platform code in the core - not more. Perhaps we can consider other options? |
I would like too, but I don't think there's anyway to interrupt
I would say just make pulling timeout shorter on Windows, like 1-3 seconds (I'm currently doing this for my own use) |
I see you have changed the winsock include - is there a reason for that? is there any side effects? should we consider doing that as a separate update to the timeout PR? |
winsock2 should be fully compatible in the current code base, there're only a few thing like If we choose to use the reduced timeout method, then this change is not needed |
Yeah, I've read that SO article a while ago - but I'm not sure why this codebase has the older header. Unfortunately the windows source code environment seems to be quite hostile to the usual programming techniques that people have been using for more decades than windows has existed :-( -- if the new header is a 100% replacement for the old header (excepting functions you have chosen to drop support for), then just replace it, dont hand the future a maintenance problem! |
So what do you think, reduce timeout or I think the reduced timeout is fine after using it for a few months If we choose the timeout one, then I think we can make another PR to unify winsock.h to winsock2.h (or reverse) |
I believe all these slow windows shutdown concerns are fixed in the recently released fork n3n. |
Just tried it, worked well with connect and then ctrl-c Closing this pull request then |
Fix #1087 partially