handle ipv6 addresses

This commit is contained in:
Chris Lu
2021-09-07 16:43:54 -07:00
parent 35c8ea495f
commit 0128239c0f
16 changed files with 42 additions and 20 deletions

View File

@@ -1,7 +1,6 @@
package weed_server
import (
"fmt"
"github.com/chrislusf/seaweedfs/weed/storage/types"
"net/http"
"sync"
@@ -113,7 +112,7 @@ func NewVolumeServer(adminMux, publicMux *http.ServeMux, ip string,
}
go vs.heartbeat()
go stats.LoopPushingMetric("volumeServer", fmt.Sprintf("%s:%d", ip, port), vs.metricsAddress, vs.metricsIntervalSec)
go stats.LoopPushingMetric("volumeServer", util.JoinHostPort(ip, port), vs.metricsAddress, vs.metricsIntervalSec)
return vs
}