Skip to content

Commit

Permalink
fix incorrect casts
Browse files Browse the repository at this point in the history
  • Loading branch information
DominicBurkart committed Jun 21, 2023
1 parent 3fc8dab commit 4f9a0a1
Showing 1 changed file with 25 additions and 3 deletions.
28 changes: 25 additions & 3 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -342,20 +342,42 @@ 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({
#[cfg(windows)]
{
exitcode::OK as u32
}
#[cfg(unix)]
exitcode::OK
}), // 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({
#[cfg(windows)]
{
exitcode::UNAVAILABLE as u32
}
#[cfg(unix)]
exitcode::OK
})
}

}
}
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({
#[cfg(windows)]
{
exitcode::UNAVAILABLE as u32
}
#[cfg(unix)]
exitcode::OK
})
}
_ => unreachable!(),
}
Expand Down

0 comments on commit 4f9a0a1

Please sign in to comment.