Skip to content

Commit

Permalink
style: remove unneeded comment
Browse files Browse the repository at this point in the history
  • Loading branch information
SkuldNorniern committed Mar 25, 2024
1 parent 02e8736 commit 7a5ee20
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 23 deletions.
7 changes: 0 additions & 7 deletions src/net/live_fluereflow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
9 changes: 0 additions & 9 deletions src/net/online_fluereflow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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![];
Expand Down
7 changes: 0 additions & 7 deletions src/net/packet_pcap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 7a5ee20

Please sign in to comment.