chore: update log and comment
This commit is contained in:
@@ -21,9 +21,7 @@ pub async fn run(listen_config: &ListenConfig) -> XResult<()> {
|
|||||||
tokio::spawn(async move {
|
tokio::spawn(async move {
|
||||||
while let Ok((inbound, _)) = listener.accept().await {
|
while let Ok((inbound, _)) = listener.accept().await {
|
||||||
information!("Receive connection: {}", inbound.peer_addr().map(|addr| format!("{}", addr)).unwrap_or_else(|_| "n/a".to_string()));
|
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()) {
|
// TODO if is_in_peer_addr_matches(&inbound, &allow_ips) {
|
||||||
// } else {
|
|
||||||
// }
|
|
||||||
if let Err(e) = inbound_stream_channel_sender.send((util_time::get_current_millis(), inbound)).await {
|
if let Err(e) = inbound_stream_channel_sender.send((util_time::get_current_millis(), inbound)).await {
|
||||||
failure!("Send tcp stream to channel failed: {}", e);
|
failure!("Send tcp stream to channel failed: {}", e);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ async fn main() -> XResult<()> {
|
|||||||
failure_and_exit!("Cannot run in both server and client mode");
|
failure_and_exit!("Cannot run in both server and client mode");
|
||||||
}
|
}
|
||||||
if !server_mode && !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");
|
let config_file = opt_value_result!(matches.value_of("config"), "--config is required");
|
||||||
|
|||||||
Reference in New Issue
Block a user