fix[net]: 修复分布式启动home服务时报net.bindException #6

This commit is contained in:
jaysunxiao
2022-06-28 10:06:09 +08:00
parent d43aae42cf
commit b2b6f6b33c
@@ -116,7 +116,7 @@ public class NetUtils {
}
// try-with-resources会自动调用close方法
try (ServerSocket ss = new ServerSocket(port)) {
try (ServerSocket ss = new ServerSocket(port, 0, getLocalhost())) {
return true;
} catch (Exception e) {
return false;