Skip to content

Commit

Permalink
derper: listen for ctrl-c to close
Browse files Browse the repository at this point in the history
  • Loading branch information
ramfox committed Jun 6, 2023
1 parent f1d96ca commit 85e3a67
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/bin/derper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,7 @@ async fn main() -> Result<()> {

let http_task = serve_http(cli.addr, cli.http_port).await?;

tokio::signal::ctrl_c().await?;
// Shutdown all tasks
if let Some(task) = stun_task {
task.abort();
Expand Down

0 comments on commit 85e3a67

Please sign in to comment.