Merge remote-tracking branch 'origin/errcode' into errcode

This commit is contained in:
withchao
2023-02-09 14:33:45 +08:00
27 changed files with 656 additions and 907 deletions
-13
View File
@@ -1,7 +1,6 @@
package utils
import (
"Open_IM/pkg/common/config"
"errors"
"net"
)
@@ -24,15 +23,3 @@ func GetLocalIP() (string, error) {
return "", errors.New("no ip")
}
func GetRpcIP() (string, error) {
registerIP := config.Config.RpcRegisterIP
if registerIP == "" {
ip, err := GetLocalIP()
if err != nil {
return "", err
}
registerIP = ip
}
return registerIP, nil
}