diff options
-rw-r--r-- | ext/net/ops_tls.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/net/ops_tls.rs b/ext/net/ops_tls.rs index ca922203c..8892ea0ac 100644 --- a/ext/net/ops_tls.rs +++ b/ext/net/ops_tls.rs @@ -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. |