mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-01-10 07:08:05 -05:00
dchatd: bugfix
shutdown p2p network only after other tasks have been shutdown
This commit is contained in:
@@ -169,13 +169,15 @@ async fn realmain(args: Args, ex: Arc<smol::Executor<'static>>) -> Result<()> {
|
||||
signals_handler.wait_termination(signals_task).await?;
|
||||
info!("Caught termination signal, cleaning up and exiting...");
|
||||
|
||||
info!("Stopping P2P network");
|
||||
p2p.stop().await;
|
||||
|
||||
info!("Stopping JSON-RPC server");
|
||||
rpc_task.stop().await;
|
||||
|
||||
info!("Stopping dnet tasks");
|
||||
dnet_task.stop().await;
|
||||
|
||||
info!("Stopping P2P network");
|
||||
p2p.stop().await;
|
||||
|
||||
info!("Shut down successfully");
|
||||
// ANCHOR_END: shutdown
|
||||
Ok(())
|
||||
|
||||
Reference in New Issue
Block a user