From 870673361021c138d925d3341ad1aefef518a794 Mon Sep 17 00:00:00 2001 From: Hatter Jiang Date: Sat, 27 Aug 2022 00:35:37 +0800 Subject: [PATCH] chore: update log and comment --- src/client.rs | 4 +--- src/main.rs | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/client.rs b/src/client.rs index 9502221..5436b46 100644 --- a/src/client.rs +++ b/src/client.rs @@ -21,9 +21,7 @@ pub async fn run(listen_config: &ListenConfig) -> XResult<()> { tokio::spawn(async move { while let Ok((inbound, _)) = listener.accept().await { information!("Receive connection: {}", inbound.peer_addr().map(|addr| format!("{}", addr)).unwrap_or_else(|_| "n/a".to_string())); - // if is_in_peer_addr_matches(&inbound, &allow_ips, sender_tx.clone()) { - // } else { - // } + // TODO if is_in_peer_addr_matches(&inbound, &allow_ips) { if let Err(e) = inbound_stream_channel_sender.send((util_time::get_current_millis(), inbound)).await { failure!("Send tcp stream to channel failed: {}", e); } diff --git a/src/main.rs b/src/main.rs index c7ae3bf..0e37646 100644 --- a/src/main.rs +++ b/src/main.rs @@ -37,7 +37,7 @@ async fn main() -> XResult<()> { failure_and_exit!("Cannot run in both server and client mode"); } if !server_mode && !client_mode { - failure_and_exit!("Must run in server on client mode") + failure_and_exit!("Must run in server or client mode") } let config_file = opt_value_result!(matches.value_of("config"), "--config is required");