mirror of
https://github.com/denoland/deno.git
synced 2025-01-11 08:33:43 -05:00
fix: finish TLS handshake before shutting down (#14547)
This commit ensures that the TLS handshake completes before attempting to close the connection.
This commit is contained in:
parent
cb884de2e9
commit
649e5ce023
1 changed files with 2 additions and 0 deletions
|
@ -438,6 +438,8 @@ impl TlsStreamInner {
|
|||
self.rd_state = State::StreamClosed;
|
||||
}
|
||||
|
||||
// Wait for the handshake to complete.
|
||||
ready!(self.poll_io(cx, Flow::Handshake))?;
|
||||
// Send TLS 'CloseNotify' alert.
|
||||
ready!(self.poll_shutdown(cx))?;
|
||||
// Wait for 'CloseNotify', shut down TCP stream, wait for TCP FIN packet.
|
||||
|
|
Loading…
Reference in a new issue