Skip to content

fix: check for ErrorKind::WouldBlock in MidHandshake::SendAlert poll#47

Merged
quininer merged 1 commit intorustls:mainfrom
jbr:send-alert-would-block
Mar 6, 2024
Merged

fix: check for ErrorKind::WouldBlock in MidHandshake::SendAlert poll#47
quininer merged 1 commit intorustls:mainfrom
jbr:send-alert-would-block

Conversation

@jbr
Copy link
Copy Markdown
Contributor

@jbr jbr commented Mar 5, 2024

Identified by comparing the implementation of rustls/futures-rustls#9 to #44. Previous to this PR, we do not necessarily poll the alert.write to completion

Copy link
Copy Markdown
Member

@djc djc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call!

@jbr
Copy link
Copy Markdown
Contributor Author

jbr commented Mar 5, 2024

It's worth noting that the LazyConfigAcceptor alert.write has the same concern, but that one is at least annotated as best effort. I think we'd want to throw an Option<AcceptedAlert> on the LazyConfigAcceptor if we wanted to correctly poll it to completion. I opened a distinct PR for that (#48), since it's slightly more invasive and could be reviewed independently from this PR

@quininer
Copy link
Copy Markdown
Member

quininer commented Mar 6, 2024

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants