mirror of
https://github.com/minio/minio.git
synced 2025-11-06 20:33:07 -05:00
fix: missing cleanup of tmp folders in NAS gateway setup (#13124)
console service should be shutdown last once all shutdown sequences are complete, this is to ensure that we do not prematurely kill the server before it cleans up the `.minio.sys/tmp/uuid` folder. NOTE: this only applies to NAS gateway setup.
This commit is contained in:
@@ -582,20 +582,17 @@ func serverMain(ctx *cli.Context) {
|
||||
}
|
||||
|
||||
if globalBrowserEnabled {
|
||||
consoleSrv, err := initConsoleServer()
|
||||
globalConsoleSrv, err = initConsoleServer()
|
||||
if err != nil {
|
||||
logger.FatalIf(err, "Unable to initialize console service")
|
||||
}
|
||||
|
||||
go func() {
|
||||
logger.FatalIf(consoleSrv.Serve(), "Unable to initialize console server")
|
||||
logger.FatalIf(globalConsoleSrv.Serve(), "Unable to initialize console server")
|
||||
}()
|
||||
|
||||
<-globalOSSignalCh
|
||||
consoleSrv.Shutdown()
|
||||
} else {
|
||||
<-globalOSSignalCh
|
||||
}
|
||||
|
||||
<-globalOSSignalCh
|
||||
}
|
||||
|
||||
// Initialize object layer with the supplied disks, objectLayer is nil upon any error.
|
||||
|
||||
Reference in New Issue
Block a user