Update
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Pierre HUBERT 2025-02-25 14:50:04 +01:00
parent 6e17c3a6c7
commit 7156719f30

View File

@ -62,6 +62,8 @@ async fn main() -> Result<(), Box<dyn Error>> {
let (mut client_socket, _) = listener.accept().await?;
tokio::spawn(async move {
log::info!("Start new mission from {}", client_socket.peer_addr().unwrap());
let args = Args::parse();
let base_file_name = format!(
@ -114,7 +116,7 @@ async fn main() -> Result<(), Box<dyn Error>> {
log::error!("Failed to read data from client, closing connection! {e}");
return;
}};
log::info!("Got a new client read {count}");
log::info!("Got a new client read {count} - {base_file_name}");
if count == 0 {
log::warn!("infinite loop (client)");
@ -152,7 +154,7 @@ async fn main() -> Result<(), Box<dyn Error>> {
return;
}
log::info!("Got a new upstream read {count}");
log::info!("Got a new upstream read {count} - {base_file_name}");
client_write.write_all(&buf_server[..count]).await.expect("Failed to write to client");
res_file.write_all(&buf_server[..count]).expect("Failed to write to res");
}