Skip to content

Commit

Permalink
Fix errors in graceful shutdown
Browse files Browse the repository at this point in the history
  • Loading branch information
danielle-tfh committed Jan 11, 2025
1 parent f8906b0 commit ebfb02e
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions iris-mpc/src/bin/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -887,12 +887,16 @@ async fn server_main(config: Config) -> eyre::Result<()> {
.await
.expect("Deserialization of probe response failed");
if probe_response.shutting_down {
tracing::error!(
"Node {} has starting graceful shutdown. Therefore starting graceful \
shutdown",
host
);
heartbeat_shutdown_handler.trigger_manual_shutdown();
tracing::info!("Node {} has starting graceful shutdown", host);

if !health_shutdown_handler.is_shutting_down() {
heartbeat_shutdown_handler.trigger_manual_shutdown();
tracing::error!(
"Node {} has starting graceful shutdown, therefore triggering \
graceful shutdown",
host
);
}
}
if probe_response.image_name != image_name {
// Do not create a panic as we still can continue to process before its
Expand Down

0 comments on commit ebfb02e

Please sign in to comment.