From 7a5ee20da4fabfafe2ea2dc6ab48f310a8057243 Mon Sep 17 00:00:00 2001 From: SkuldNorniern Date: Mon, 25 Mar 2024 12:27:32 +0900 Subject: [PATCH] style: remove unneeded comment --- src/net/live_fluereflow.rs | 7 ------- src/net/online_fluereflow.rs | 9 --------- src/net/packet_pcap.rs | 7 ------- 3 files changed, 23 deletions(-) diff --git a/src/net/live_fluereflow.rs b/src/net/live_fluereflow.rs index 3bc3ec8..718ed08 100644 --- a/src/net/live_fluereflow.rs +++ b/src/net/live_fluereflow.rs @@ -271,13 +271,6 @@ pub async fn online_packet_capture(arg: Args) { } } - // packet_count += 1; - // slow down the loop for windows to avoid random shutdown - // if packet_count % sleep_windows == 0 && cfg!(target_os = "windows") { - // println!("Slow down the loop for windows"); - // sleep(Duration::from_millis(0)).await; - // } - // Export flows if the interval has been reached let mut last_export_guard = last_export.lock().await; let mut last_export_unix_time_guard = last_export_unix_time.lock().await; diff --git a/src/net/online_fluereflow.rs b/src/net/online_fluereflow.rs index b08bbaa..8a833c0 100644 --- a/src/net/online_fluereflow.rs +++ b/src/net/online_fluereflow.rs @@ -182,15 +182,6 @@ pub async fn packet_capture(arg: Args) -> Result<(), FluereError> { } } - // packet_count += 1; - // slow down the loop for windows to avoid random shutdown - // if packet_count % sleep_windows == 0 && cfg!(target_os = "windows") { - // if verbose >= 3 { - // println!("Slow down the loop for windows"); - // } - // sleep(Duration::from_millis(0)).await; - // } - // Export flows if the interval has been reached if last_export.elapsed() >= Duration::from_millis(interval) && interval != 0 { let mut expired_flows = vec![]; diff --git a/src/net/packet_pcap.rs b/src/net/packet_pcap.rs index a5be5e0..2900740 100644 --- a/src/net/packet_pcap.rs +++ b/src/net/packet_pcap.rs @@ -43,13 +43,6 @@ pub async fn pcap_capture(args: Args) { //println!("packet: {:?}", packet); file.write(&packet); - // packet_count += 1; - // slow down the loop for windows to avoid random shutdown - // if packet_count % sleep_windows == 0 && cfg!(target_os = "windows") { - // println!("Slow down the loop for windows"); - // sleep(Duration::from_millis(0)).await; - // } - // Check if the duration has been reached if start.elapsed() >= Duration::from_millis(duration) && duration != 0 { break;