chore: update log and comment

This commit is contained in:
2022-08-27 00:35:37 +08:00
parent 47d2937c45
commit 8706733610
2 changed files with 2 additions and 4 deletions

View File

@@ -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);
}

View File

@@ -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");