aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVlad Dumitrescu <[email protected]>2012-09-19 10:17:54 +0200
committerHenrik Nord <[email protected]>2012-10-01 11:26:14 +0200
commitfd2c5a8d0aeebdaf34fe920e25dd6c13ead2454a (patch)
treec34da7f2015d5bb8b0545fee596b402303e9b223
parent89ca0448e93beed780bc4c233529ce73063e8337 (diff)
downloadotp-fd2c5a8d0aeebdaf34fe920e25dd6c13ead2454a.tar.gz
otp-fd2c5a8d0aeebdaf34fe920e25dd6c13ead2454a.tar.bz2
otp-fd2c5a8d0aeebdaf34fe920e25dd6c13ead2454a.zip
OtpEpmd.lokupNames() may hang if network is badly configured
On some machines with weird network configurations, InetAddress.getLocalHost() hangs. Searching for "localhost" works (at least in the cases I met). The difference is that the loopback address will be returned, instead of the real IP address, but for the local machine this should not be a problem.
-rw-r--r--lib/jinterface/java_src/com/ericsson/otp/erlang/OtpEpmd.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpEpmd.java b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpEpmd.java
index deac528133..b985f8aa50 100644
--- a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpEpmd.java
+++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpEpmd.java
@@ -358,7 +358,7 @@ public class OtpEpmd {
}
public static String[] lookupNames() throws IOException {
- return lookupNames(InetAddress.getLocalHost());
+ return lookupNames(InetAddress.getByName(null));
}
public static String[] lookupNames(final InetAddress address)