I wrote a custom acceptor that enforces client hostname checking during mTLS. I noticed in serve that errors from the acceptor are ignored, leading the the socket being closed with out reporting an error back to the client. It would be helpful to report these errors back to the client before closing the connection.
serve in server.rs
tokio::spawn(async move {
if let Ok((stream, send_service)) = acceptor.accept(addr_stream, service).await
// ^^^^ maybe match on the result and write the error down the socket before closing the connection.
.....
Hi there,
I wrote a custom acceptor that enforces client hostname checking during mTLS. I noticed in
serve
that errors from the acceptor are ignored, leading the the socket being closed with out reporting an error back to the client. It would be helpful to report these errors back to the client before closing the connection.serve in server.rs