init console server after server config is initialized

fixes #14259
This commit is contained in:
Harshavardhana 2022-02-07 00:17:26 -08:00
parent 570670be8c
commit 186c477f3c

View File

@ -531,19 +531,6 @@ func serverMain(ctx *cli.Context) {
}
}
if globalBrowserEnabled {
srv, err := initConsoleServer()
if err != nil {
logger.FatalIf(err, "Unable to initialize console service")
}
setConsoleSrv(srv)
go func() {
logger.FatalIf(newConsoleServerFn().Serve(), "Unable to initialize console server")
}()
}
newObject, err := newObjectLayer(GlobalContext, globalEndpoints)
if err != nil {
logFatalErrs(err, Endpoint{}, true)
@ -576,6 +563,19 @@ func serverMain(ctx *cli.Context) {
logger.LogIf(GlobalContext, err)
}
if globalBrowserEnabled {
srv, err := initConsoleServer()
if err != nil {
logger.FatalIf(err, "Unable to initialize console service")
}
setConsoleSrv(srv)
go func() {
logger.FatalIf(newConsoleServerFn().Serve(), "Unable to initialize console server")
}()
}
// Populate existing buckets to the etcd backend
if globalDNSConfig != nil {
// Background this operation.