Skip to content

Commit

Permalink
chore: log error during connection
Browse files Browse the repository at this point in the history
  • Loading branch information
sigoden committed Dec 21, 2023
1 parent 52506bc commit a66f95b
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,7 @@ fn serve(args: Args, running: Arc<AtomicBool>) -> Result<Vec<JoinHandle<()>>> {
loop {
let (cnx, addr) = listener.accept().await.unwrap();
let Ok(stream) = tls_accepter.accept(cnx).await else {
eprintln!(
"WARNING during tls handshake connection from {}",
addr
);
warn!("During cls handshake connection from {}", addr);
continue;
};
let stream = TokioIo::new(stream);
Expand Down Expand Up @@ -172,7 +169,7 @@ where
};
match err.downcast_ref::<std::io::Error>() {
Some(err) if err.kind() == std::io::ErrorKind::UnexpectedEof => {}
_ => eprintln!("WARNING serving connection{}: {}", scope, err),
_ => warn!("Serving connection{}: {}", scope, err),
}
}
}
Expand Down

0 comments on commit a66f95b

Please sign in to comment.