mirror of
https://github.com/pgsty/minio.git
synced 2026-07-22 13:40:22 +03:00
server-mux: Simplify graceful shutdown behavior (#3681)
`*http.Server` is no more used, doing some cleanup.
This commit is contained in:
committed by
Harshavardhana
parent
ed4fcb63f7
commit
b6ebf2aba8
@@ -19,7 +19,6 @@ package cmd
|
||||
import (
|
||||
"fmt"
|
||||
"net"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// getListenIPs - gets all the ips to listen on.
|
||||
@@ -49,7 +48,7 @@ func getListenIPs(serverAddr string) (hosts []string, port string, err error) {
|
||||
}
|
||||
|
||||
// Finalizes the API endpoints based on the host list and port.
|
||||
func finalizeAPIEndpoints(apiServer *http.Server) (endPoints []string, err error) {
|
||||
func finalizeAPIEndpoints(addr string) (endPoints []string, err error) {
|
||||
// Verify current scheme.
|
||||
scheme := httpScheme
|
||||
if globalIsSSL {
|
||||
@@ -57,7 +56,7 @@ func finalizeAPIEndpoints(apiServer *http.Server) (endPoints []string, err error
|
||||
}
|
||||
|
||||
// Get list of listen ips and port.
|
||||
hosts, port, err1 := getListenIPs(apiServer.Addr)
|
||||
hosts, port, err1 := getListenIPs(addr)
|
||||
if err1 != nil {
|
||||
return nil, err1
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user