-
Notifications
You must be signed in to change notification settings - Fork 726
unbuffered: introduce PeerClosed
state
#2332
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
Benchmark resultsInstruction countsSignificant differencesClick to expand
Other differencesClick to expand
Wall-timeSignificant differencesThere are no significant wall-time differences Other differencesClick to expand
Additional informationCheckout details:
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2332 +/- ##
=======================================
Coverage 94.88% 94.88%
=======================================
Files 103 103
Lines 24201 24216 +15
=======================================
+ Hits 22962 22977 +15
Misses 1239 1239 ☔ View full report in Codecov by Sentry. |
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.
Nice!
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.
Nice, 👍
rustls/src/conn/unbuffered.rs
Outdated
@@ -131,6 +131,18 @@ impl<Data> UnbufferedConnectionCommon<Data> { | |||
.core | |||
.common_state | |||
.has_received_close_notify | |||
&& !self.emitted_peer_closed |
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.
I'm starting to find the big chain of if/else if
's and their relatively complicated boolean expressions tricky to follow. It's quite dense.
I don't think it's necessary to clean up in this branch but I wonder if we could lift out some intermediate vars at the minimum so that the density is reduced a little bit.
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.
Yeah, agree. Even though I find the way the early data state is injected into process_tls_records_common
a bit distasteful as a special case, I think actually it's a good direction to split the logic up a bit.
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 suggest taking that out of this PR, though.
d39c910
to
868873a
Compare
Reduce rightward drift and prefer match to trivial if-let.
`Closed` is now bi-directional, terminal closure state.
868873a
to
bf34465
Compare
Closed
was, and remains, the bi-directional, terminal closure state.Because
rustls::unbuffered::ConnectionState
is anon_exhaustive
enum, this is not a breaking API change. However, it demands a clear release note because downstream users will now encounter the new state.fixes #1895