Deprecate --listeners flag (#15900)

This commit is contained in:
Anis Elleuch authored and GitHub committed 2022-10-19 08:45:50 -07:00
1 parent 374abd1e7d
commit de5070446d
2 files changed
+4 -21

No files matched your search

+1 -10
View File
@@ -249,16 +249,7 @@ func StartGateway(ctx *cli.Context, gw Gateway) {
getCert = globalTLSCerts.GetCertificate
}
listeners := ctx.Int("listeners")
if listeners == 0 {
listeners = 1
}
addrs := make([]string, 0, listeners)
for i := 0; i < listeners; i++ {
addrs = append(addrs, globalMinioAddr)
}
httpServer := xhttp.NewServer(addrs).
httpServer := xhttp.NewServer([]string{globalMinioAddr}).
UseHandler(setCriticalErrorHandler(corsHandler(router))).
UseTLSConfig(newTLSConfig(getCert)).
UseShutdownTimeout(ctx.Duration("shutdown-timeout")).