From 232cc174cff5c06ba806d4764dd0608d8bb4ac78 Mon Sep 17 00:00:00 2001 From: parazyd Date: Tue, 4 Jul 2023 08:22:45 +0200 Subject: [PATCH] taud: Cleanly stop p2p network on term signal. --- Makefile | 2 +- bin/tau/taud/src/main.rs | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 91ceb73ef..6489d896c 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,7 @@ CARGO = cargo +nightly #TARGET_PRFX = --target= # Binaries to be built -BINS = darkfid faucetd drk darkirc dnetview vanityaddr +BINS = darkfid faucetd drk darkirc dnetview vanityaddr tau taud # zkas dependencies ZKASDEPS = \ diff --git a/bin/tau/taud/src/main.rs b/bin/tau/taud/src/main.rs index 9ea3c5fc6..78b8cefc0 100644 --- a/bin/tau/taud/src/main.rs +++ b/bin/tau/taud/src/main.rs @@ -399,5 +399,7 @@ async fn realmain(settings: Args, executor: Arc>) -> Result<( print!("\r"); info!("Caught termination signal, cleaning up and exiting..."); + p2p.stop().await; + Ok(()) }