Dont start console service if MINIO_BROWSER=off (#20374)

By default, even if MINIO_BROWSER=off set code tries to get free
port available for the console. 

Signed-off-by: Shubhendu Ram Tripathi <shubhendu@minio.io>
This commit is contained in:
Shubhendu
2024-09-04 22:32:39 +05:30
committed by GitHub
parent 9b79eec29e
commit 6224849fd1
3 changed files with 33 additions and 20 deletions

View File

@@ -81,8 +81,10 @@ func handleSignals() {
shutdownLogIf(context.Background(), objAPI.Shutdown(context.Background()))
}
if srv := newConsoleServerFn(); srv != nil {
shutdownLogIf(context.Background(), srv.Shutdown())
if globalBrowserEnabled {
if srv := newConsoleServerFn(); srv != nil {
shutdownLogIf(context.Background(), srv.Shutdown())
}
}
if globalEventNotifier != nil {