Skip to content

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

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

quininer merged 1 commit into
rustls:mainfrom
jbr:send-alert-would-block

Conversation

@jbr

@jbr jbr commented Mar 5, 2024

Copy link
Copy Markdown
Contributor

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

@djc djc left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Good call!

@jbr

jbr commented Mar 5, 2024 •

Copy link
Copy Markdown
Contributor Author

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

quininer commented Mar 6, 2024

Copy link
Copy Markdown
Member

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