Status server: avoid server shutdown caused by TLS handshake failure
@@ -827,9 +827,15 @@ fn tls_incoming(
}
None => break,
};
- yield tokio_openssl::accept(&acceptor, stream)
- .await
- .map_err(|_| std::io::Error::new(std::io::ErrorKind::Other, "TLS handshake error"));
+ match tokio_openssl::accept(&acceptor, stream).await {
+ Err(_) => {
+ error!("Status server error: TLS handshake error");
+ continue;
+ },
+ Ok(ssl_stream) => {
+ yield Ok(ssl_stream);
+ },
+ }
}
};
TlsIncoming(s)
