From d372ea753f18d214e2a88e813b5b318db516f18a Mon Sep 17 00:00:00 2001 From: zzz Date: Wed, 30 Dec 2009 22:26:02 +0000 Subject: [PATCH] fallback to external socket --- core/java/src/net/i2p/util/InternalSocket.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/core/java/src/net/i2p/util/InternalSocket.java b/core/java/src/net/i2p/util/InternalSocket.java index 26280f254..24d743423 100644 --- a/core/java/src/net/i2p/util/InternalSocket.java +++ b/core/java/src/net/i2p/util/InternalSocket.java @@ -36,10 +36,12 @@ public class InternalSocket extends Socket { public static Socket getSocket(String host, int port) throws IOException { if (System.getProperty("router.version") != null && (host.equals("127.0.0.1") || host.equals("localhost"))) { - return new InternalSocket(port); - } else { - return new Socket(host, port); + try { + return new InternalSocket(port); + } catch (IOException ioe) {} + // guess it wasn't really internal... } + return new Socket(host, port); } @Override