fallback to external socket

This commit is contained in:
zzz
2009-12-30 22:26:02 +00:00
parent 2528cd205d
commit d372ea753f

View File

@ -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