mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-07 02:26:00 +08:00
Merge remote-tracking branch 'origin/errcode' into errcode
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
package network
|
||||
|
||||
import utils "github.com/OpenIMSDK/open_utils"
|
||||
import (
|
||||
"OpenIM/pkg/common/constant"
|
||||
utils "github.com/OpenIMSDK/open_utils"
|
||||
)
|
||||
|
||||
func GetRpcRegisterIP(configIP string) (string, error) {
|
||||
registerIP := configIP
|
||||
@@ -16,7 +19,7 @@ func GetRpcRegisterIP(configIP string) (string, error) {
|
||||
|
||||
func GetListenIP(configIP string) string {
|
||||
if configIP == "" {
|
||||
return "0.0.0.0"
|
||||
return constant.LocalHost
|
||||
} else {
|
||||
return configIP
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ func (r *RPCServer) onInit(rpcPort int) {
|
||||
func (r *RPCServer) run() {
|
||||
listenIP := ""
|
||||
if config.Config.ListenIP == "" {
|
||||
listenIP = "0.0.0.0"
|
||||
listenIP = constant.LocalHost
|
||||
} else {
|
||||
listenIP = config.Config.ListenIP
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user