From c2b7c3417c5be450c6d3e102fe9baa188749e192 Mon Sep 17 00:00:00 2001 From: Martin Moreira de Jesus Date: Thu, 25 Apr 2024 21:19:31 +0200 Subject: [PATCH] feat(agent/grpc): add ungraceful shutdown Signed-off-by: Martin Moreira de Jesus --- src/agent/src/workload/service.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/agent/src/workload/service.rs b/src/agent/src/workload/service.rs index 3de5455..3d3a809 100644 --- a/src/agent/src/workload/service.rs +++ b/src/agent/src/workload/service.rs @@ -1,4 +1,4 @@ -use std::{process::exit, sync::Arc}; +use std::{process, sync::Arc}; use crate::agent::{self, ExecuteRequest, ExecuteResponse, SignalRequest}; @@ -62,6 +62,6 @@ impl WorkloadRunner for WorkloadRunnerService { } async fn signal(&self, _: Request) -> Result<()> { - unreachable!(); + process::exit(0) } }