diff --git a/src/app.rs b/src/app.rs index 6dca25555f3c75..f10275ac782b49 100644 --- a/src/app.rs +++ b/src/app.rs @@ -342,20 +342,21 @@ impl FinishedApplication { SignalTo::Shutdown => { emit!(VectorStopped); tokio::select! { - _ = topology_controller.stop() => ExitStatus::from_raw(exitcode::OK as u32), // Graceful shutdown finished + _ = topology_controller.stop() => ExitStatus::from_raw(exitcode::OK.try_into().unwrap()), // Graceful shutdown finished _ = signal_rx.recv() => { // It is highly unlikely that this event will exit from topology. emit!(VectorQuit); // Dropping the shutdown future will immediately shut the server down - ExitStatus::from_raw(exitcode::UNAVAILABLE as u32) + ExitStatus::from_raw(exitcode::UNAVAILABLE.try_into().unwrap()) } + } } SignalTo::Quit => { // It is highly unlikely that this event will exit from topology. emit!(VectorQuit); drop(topology_controller); - ExitStatus::from_raw(exitcode::UNAVAILABLE as u32) + ExitStatus::from_raw(exitcode::UNAVAILABLE.try_into().unwrap()) } _ => unreachable!(), }