From fd2c5a8d0aeebdaf34fe920e25dd6c13ead2454a Mon Sep 17 00:00:00 2001 From: Vlad Dumitrescu Date: Wed, 19 Sep 2012 10:17:54 +0200 Subject: 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. --- lib/jinterface/java_src/com/ericsson/otp/erlang/OtpEpmd.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/jinterface') 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) -- cgit v1.2.3