Skip to content

Commit

Permalink
fix(plugin): fix unintended bot's edit
Browse files Browse the repository at this point in the history
  • Loading branch information
SkuldNorniern committed Jan 5, 2024
1 parent 36373b9 commit 93c2f5b
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/net/live_fluereflow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,11 +177,7 @@ pub async fn online_packet_capture(arg: Args) {
}
});

tokio::spawn(async {
if let Err(e) = listen_for_exit_keys().await {
println!("Error listening for exit keys: {}", e);
}
});
tokio::spawn(listen_for_exit_keys());
loop {
match cap.next_packet() {
Err(_) => {
Expand Down Expand Up @@ -523,7 +519,7 @@ async fn listen_for_exit_keys() -> Result<(), std::io::Error> {
match code {
KeyCode::Char('c') if modifiers == event::KeyModifiers::CONTROL => {
//println!("Ctrl+C pressed. Exiting...");
return Ok(());
std::process::exit(0);
}
KeyCode::Char('q') | KeyCode::Char('Q') => {
//println!("'q' or 'Q' pressed. Exiting...");
Expand Down

0 comments on commit 93c2f5b

Please sign in to comment.