fix 修复 客户端启动 读取出不可用的本地循环地址问题
Signed-off-by: 疯狂的狮子Li <15040126243@163.com>
This commit is contained in:
parent
db5846e65d
commit
1a61255f2c
@ -57,7 +57,11 @@ public class NettyChannel {
|
||||
|
||||
static {
|
||||
PORT = Integer.parseInt(System.getProperty(SNAIL_JOB_CLIENT_PORT, String.valueOf(1789)));
|
||||
HOST = System.getProperty(SNAIL_JOB_CLIENT_HOST, NetUtil.getLocalIpStr());
|
||||
String ip = NetUtil.getLocalIpStr();
|
||||
if ("0:0:0:0:0:0:0:1".equals(ip)) {
|
||||
ip = "127.0.0.1";
|
||||
}
|
||||
HOST = System.getProperty(SNAIL_JOB_CLIENT_HOST, ip);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user