mirror of
https://github.com/minio/minio.git
synced 2025-11-08 21:24:55 -05:00
compute localIPs only once per server startup() (#19951)
repeatedly calling this function is not necessary, on systems with lots of interfaces, including virtual ones can make this reasonably delayed.
This commit is contained in:
@@ -680,10 +680,8 @@ func getServerListenAddrs() []string {
|
||||
// Use a string set to avoid duplication
|
||||
addrs := set.NewStringSet()
|
||||
// Listen on local interface to receive requests from Console
|
||||
for _, ip := range mustGetLocalIPs() {
|
||||
if ip != nil && ip.IsLoopback() {
|
||||
addrs.Add(net.JoinHostPort(ip.String(), globalMinioPort))
|
||||
}
|
||||
for _, ip := range localLoopbacks.ToSlice() {
|
||||
addrs.Add(net.JoinHostPort(ip, globalMinioPort))
|
||||
}
|
||||
host, _ := mustSplitHostPort(globalMinioAddr)
|
||||
if host != "" {
|
||||
|
||||
Reference in New Issue
Block a user