Skip to content

Commit

Permalink
fix the loopback ip bingding bug
Browse files Browse the repository at this point in the history
  • Loading branch information
yllions committed Jan 30, 2015
1 parent d3e7087 commit a9ab0c2
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ private void pingDrivers(DriverInfo[] driverInfos) {
try{
Socket socket = new Socket();
InetSocketAddress reAddress = new InetSocketAddress(ipAddress, 18088);
InetSocketAddress locAddress = new InetSocketAddress("127.0.0.1", 0);
InetSocketAddress locAddress = new InetSocketAddress("0.0.0.0", 0);
socket.bind(locAddress);
socket.connect(reAddress,3000);
isAlive = true;
Expand All @@ -72,6 +72,7 @@ private String getIpAddres(String url) {
int end = url.lastIndexOf(':');
return end > start ? url.substring(start, end) : null;
}


}

0 comments on commit a9ab0c2

Please sign in to comment.