This commit is contained in:
		@@ -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");
 | 
			
		||||
                    }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user