Skip to content

Commit

Permalink
Add request address to error message
Browse files Browse the repository at this point in the history
  • Loading branch information
WilliamRagstad committed Apr 2, 2024
1 parent 8f5e72a commit 1f678a9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/engine/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,9 @@ impl WXServer {
/// This is the main entry point for each connection to the server
/// and simply passes the connection to the request handler `WXSvc` service.
async fn serve(io: TokioIo<tokio::net::TcpStream>, svc: WXSvc) {
let addr = svc.address.unwrap();
if let Err(err) = http1::Builder::new().serve_connection(io, svc).await {
eprintln!("failed to serve connection: {:?}", err);
eprintln!("failed to serve connection {}: {:?}", addr, err);
}
}
}
Expand Down

0 comments on commit 1f678a9

Please sign in to comment.