-
Notifications
You must be signed in to change notification settings - Fork 744
Avoid hanging if the client disconnects while self.wants_write() #2060
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
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2060 +/- ##
=======================================
Coverage 94.47% 94.47%
=======================================
Files 100 100
Lines 23248 23251 +3
=======================================
+ Hits 21963 21966 +3
Misses 1285 1285 ☔ View full report in Codecov by Sentry. |
I think this is a good change, but some of the justification around it is not correct: if the peer at the other end of a socket disconnects that does not lead to write returning zero, it should return an error (the underlying posix error would be I think this deserves a test. |
Done. |
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.
Thanks!
Benchmark resultsInstruction countsSignificant differencesClick to expand
Other differencesClick to expand
Wall-timeSignificant differencesClick to expand
Other differencesClick to expand
Additional informationCheckout details:
|
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 mind squashing your two commits & fixing the commit message typo? Thanks!
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.
Thanks :-)
Similarly to how Ok(0) (zero) is treated below, rustls should exit the loop instead of spinning indefinitely upon receiving Ok(0).
Similarly to how Ok(0) (zero) is treated during reads below, rustls should exit the loop instead of spinning indefinitely upon receiving Ok(0).