Skip to content

Commit

Permalink
fix(iroh): do not exit on ctrl+c (#1691)
Browse files Browse the repository at this point in the history
Closes #1690

---------

Co-authored-by: Brendan O'Brien <sparkle_pony_2000@qri.io>
  • Loading branch information
dignifiedquire and b5 committed Oct 20, 2023
1 parent 0cbab51 commit a658d4a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion iroh/src/commands/repl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,10 @@ impl Repl {
Some(ReplCmd::Rpc(cmd)) => self.cmd_tx.blocking_send((cmd, reply_tx))?,
}
}
Err(ReadlineError::Interrupted | ReadlineError::Eof) => break,
Err(ReadlineError::Interrupted) => {
println!("KeyboardInterrupt (press Ctrl-D to exit)");
continue;
}
Err(ReadlineError::WindowResized) => continue,
Err(err) => return Err(err.into()),
}
Expand Down

0 comments on commit a658d4a

Please sign in to comment.