Skip to content

Commit b005b1e

Browse files
committed
Fixed accepting TLS Stream
1 parent 841c50c commit b005b1e

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/http_server/https_server.rs

+7-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,13 @@ async fn lazy_accept_tcp_stream(
108108

109109
println!("Created config");
110110

111-
let tls_stream = start.into_stream(config.into()).await.unwrap();
111+
let tls_stream = start.into_stream(config.into()).await;
112+
113+
if let Err(err) = &tls_stream {
114+
return Err(format!("failed to perform tls handshake: {err:#}"));
115+
}
116+
117+
let tls_stream = tls_stream.unwrap();
112118

113119
println!("Applied config");
114120
let cn_user_name = if let Some(client_cert_cell) = client_cert_cell {

0 commit comments

Comments
 (0)