mirror of
https://github.com/minio/minio.git
synced 2025-11-20 01:50:24 -05:00
Merge ListenAndServe and ListenAndServeTLS for simplification purpose (#3186)
This commit is contained in:
committed by
Harshavardhana
parent
1105508453
commit
754c0770d6
@@ -487,12 +487,11 @@ func serverMain(c *cli.Context) {
|
||||
// Start server, automatically configures TLS if certs are available.
|
||||
go func(tls bool) {
|
||||
var lerr error
|
||||
cert, key := "", ""
|
||||
if tls {
|
||||
lerr = apiServer.ListenAndServeTLS(mustGetCertFile(), mustGetKeyFile())
|
||||
} else {
|
||||
// Fallback to http.
|
||||
lerr = apiServer.ListenAndServe()
|
||||
cert, key = mustGetCertFile(), mustGetKeyFile()
|
||||
}
|
||||
lerr = apiServer.ListenAndServe(cert, key)
|
||||
fatalIf(lerr, "Failed to start minio server.")
|
||||
}(tls)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user