From 1f678a9bda1bb35a6943bd178826396f77ba7b0c Mon Sep 17 00:00:00 2001 From: WilliamRagstad Date: Tue, 2 Apr 2024 22:27:23 +0200 Subject: [PATCH] Add request address to error message --- src/engine/server.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/engine/server.rs b/src/engine/server.rs index ce9c2c7..09f283d 100644 --- a/src/engine/server.rs +++ b/src/engine/server.rs @@ -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, 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); } } }