From df65aee55b04898d90b809ede51e9ca4d5e6c2d4 Mon Sep 17 00:00:00 2001 From: philsippl Date: Sun, 1 Sep 2024 20:20:55 +0000 Subject: [PATCH] up --- iris-mpc/src/bin/server.rs | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/iris-mpc/src/bin/server.rs b/iris-mpc/src/bin/server.rs index 919a3579a..a5304d6f4 100644 --- a/iris-mpc/src/bin/server.rs +++ b/iris-mpc/src/bin/server.rs @@ -507,14 +507,13 @@ async fn server_main(config: Config) -> eyre::Result<()> { tracing::info!("Preparing task monitor"); let mut background_tasks = TaskMonitor::new(); - // let (tx, rx) = oneshot::channel(); - // let _heartbeat = background_tasks.spawn(start_heartbeat(config.party_id, - // tx)); - - // background_tasks.check_tasks(); - // tracing::info!("Heartbeat starting..."); - // rx.await??; - // tracing::info!("Heartbeat started."); + let (tx, rx) = oneshot::channel(); + let _heartbeat = background_tasks.spawn(start_heartbeat(config.party_id, tx)); + + background_tasks.check_tasks(); + tracing::info!("Heartbeat starting..."); + rx.await??; + tracing::info!("Heartbeat started."); // a bit convoluted, but we need to create the actor on the thread already, // since it blocks a lot and is `!Send`, we get back the handle via the oneshot