diff --git a/src/main.rs b/src/main.rs index 2d6e6fc..0b6721c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -81,7 +81,7 @@ fn forward(bind_addr: &str, local_port: u16, remote_host: &str, remote_port: u16 let client_id = format!("{}", src_addr); if remove_existing { - debugging!("Removing existing forwarder from map."); + debugging!("Removing existing forwarder from map: {}", client_id); client_map.remove(&client_id); } @@ -105,7 +105,7 @@ fn forward(bind_addr: &str, local_port: u16, remote_host: &str, remote_port: u16 |_| panic!("Failed to clone client-specific connection to upstream!") ); - let mut timeouts : u64 = 0; + let mut timeouts: u64 = 0; let timed_out = Arc::new(AtomicBool::new(false)); let local_timed_out = timed_out.clone(); @@ -123,7 +123,7 @@ fn forward(bind_addr: &str, local_port: u16, remote_host: &str, remote_port: u16 debugging!("Terminating forwarder thread for client {} due to timeout", src_addr); break; } - } + }, }; } }); @@ -143,7 +143,7 @@ fn forward(bind_addr: &str, local_port: u16, remote_host: &str, remote_port: u16 timed_out.store(true, Ordering::Relaxed); break; } - } + }, }; } }); @@ -161,7 +161,7 @@ fn forward(bind_addr: &str, local_port: u16, remote_host: &str, remote_port: u16 debugging!("New connection received from previously timed-out client {}", client_id); remove_existing = true; continue; - } + }, } } }