mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-08 11:05:59 +08:00
Error code standardization
This commit is contained in:
@@ -2,7 +2,7 @@ package network
|
||||
|
||||
import utils "github.com/OpenIMSDK/open_utils"
|
||||
|
||||
func GetRpcIP(configIP string) (string, error) {
|
||||
func GetRpcRegisterIP(configIP string) (string, error) {
|
||||
registerIP := configIP
|
||||
if registerIP == "" {
|
||||
ip, err := utils.GetLocalIP()
|
||||
@@ -13,3 +13,11 @@ func GetRpcIP(configIP string) (string, error) {
|
||||
}
|
||||
return registerIP, nil
|
||||
}
|
||||
|
||||
func GetListenIP(configIP string) string {
|
||||
if configIP == "" {
|
||||
return "0.0.0.0"
|
||||
} else {
|
||||
return configIP
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user