fix: use typed hyper::Error::is_incomplete_message() instead of fragile string matching

This commit is contained in:
2026-06-12 04:25:11 +00:00
parent f9d7b8112b
commit 067f8a9012

View File

@@ -92,8 +92,10 @@ pub async fn serve_https_listener(
.serve_connection_with_upgrades(io, svc)
.await
{
if e.to_string().contains("incomplete message") {
return;
if let Some(hyper_err) = e.downcast_ref::<hyper::Error>() {
if hyper_err.is_incomplete_message() {
return;
}
}
error!(error = %e, "HTTPS connection error");
}