mirror of
https://github.com/tiennm99/zfoo.git
synced 2026-08-18 00:24:20 +00:00
fix[net]: 修复分布式启动home服务时报net.bindException #6
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user