Refine ipv6 support (#4352)

* Refine ipv6 support

* go mod

* check ipv4 is set in turn
This commit is contained in:
cnderrauber
2026-03-09 20:43:00 +08:00
committed by GitHub
parent b34b047247
commit e963953817
5 changed files with 10 additions and 7 deletions
+2 -2
View File
@@ -48,7 +48,7 @@ type LocalNodeImpl struct {
func NewLocalNode(conf *config.Config) (*LocalNodeImpl, error) {
nodeID := guid.New(utils.NodePrefix)
if conf != nil && conf.RTC.NodeIP == "" {
if conf != nil && conf.RTC.NodeIP.IsEmpty() {
return nil, ErrIPNotSet
}
nowUnix := time.Now().Unix()
@@ -65,7 +65,7 @@ func NewLocalNode(conf *config.Config) (*LocalNodeImpl, error) {
}
var nsc *config.NodeStatsConfig
if conf != nil {
l.node.Ip = conf.RTC.NodeIP
l.node.Ip = conf.RTC.NodeIP.PrimaryIP()
l.node.Region = conf.Region
nsc = &conf.NodeStats