-
Notifications
You must be signed in to change notification settings - Fork 625
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
Avoid sending multiple close notifies #1955
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1955 /- ##
=======================================
Coverage 95.48% 95.49%
=======================================
Files 86 86
Lines 18664 18672 8
=======================================
Hits 17821 17830 9
Misses 843 842 -1 ☔ View full report in Codecov by Sentry. |
Benchmark resultsInstruction countsSignificant differencesThere are no significant instruction count differences Other differencesClick to expand
Wall-timeSignificant differencesClick to expand
Other differencesClick to expand
Additional informationCheckout details:
|
`tokio-rustls` has a test that accidentally does this twice. Make this call idempotent.
- before the handshake finishes - after a `close_notify` before the handshake finishes - after a `close_notify` after the handshake finishes - `read_tls` artificial EOF after `close_notify`
4619a20
to
ba5f69b
Compare
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.
LGTM.
Can you add some proposed release notes to the PR desc?
Added |
Thanks!
This reads a little bit awkwardly to me. Maybe something like: "Correct fix in 0.23.6 to properly discard data after |
Agreed, replaced with your wording. Thanks! |
This PR also fixes #1950 which caused a desynchronisation after a close notify.
After this PR, tokio-rustls test suite breakage caused in 0.23.6 (see https://github.com/rustls/tokio-rustls/actions/runs/9123001981/job/25084713982) is fixed
0.23.7 draft release notes
send_close_notify
is now idempotent, in case it is accidentally called more than once.read_tls
now refuses to read further data after aclose_notify
is received, by returningOk(0)
(ie, an EOF).close_notify
received, avoiding a spuriousDecryptError
on subsequent calls toprocess_new_packets()
.