Skip to content

Flush the transport after writing a fatal alert - #222

Open
patrick-immometrica wants to merge 1 commit into
rustls:mainfrom
patrick-immometrica:flush-alerts
Open

patrick-immometrica wants to merge 1 commit into
rustls:mainfrom
patrick-immometrica:flush-alerts

Conversation

@patrick-immometrica

Copy link
Copy Markdown

When the handshake fails, the alert is written to the transport but never flushed. With a buffered transport (e.g. BufWriter) the alert is dropped together with the stream and the peer only sees an EOF.

MidHandshake::SendAlert now flushes and waits for it. The error path in read_io can't wait, so it only tries a flush once.

When the handshake fails, the alert is written to the transport but
never flushed. With a buffered transport (e.g. BufWriter) the alert is
dropped together with the stream and the peer only sees an EOF.

MidHandshake::SendAlert now flushes and waits for it. The error path in
read_io can't wait, so it only tries a flush once.
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.

1 participant