mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-27 15:37:02 +00:00
fix
This commit is contained in:
+5
-1
@@ -610,7 +610,11 @@ async fn run(opt: config::Opt) -> Result<()> {
|
|||||||
tokio::time::sleep(SHUTDOWN_TIMEOUT).await;
|
tokio::time::sleep(SHUTDOWN_TIMEOUT).await;
|
||||||
// listen to the shutdown signal
|
// listen to the shutdown signal
|
||||||
match wait_for_shutdown().await {
|
match wait_for_shutdown().await {
|
||||||
ShutdownSignal::CtrlC | ShutdownSignal::Sigint | ShutdownSignal::Sigterm => {
|
ShutdownSignal::CtrlC
|
||||||
|
#[cfg(unix)]
|
||||||
|
| ShutdownSignal::Sigint
|
||||||
|
#[cfg(unix)]
|
||||||
|
| ShutdownSignal::Sigterm => {
|
||||||
info!("Shutdown signal received in main thread");
|
info!("Shutdown signal received in main thread");
|
||||||
// update the status to stopping first
|
// update the status to stopping first
|
||||||
state_manager.update(ServiceState::Stopping);
|
state_manager.update(ServiceState::Stopping);
|
||||||
|
|||||||
Reference in New Issue
Block a user