Index: /feedtree/trunk/src/net/feedtree/core/client/Client.java =================================================================== --- /feedtree/trunk/src/net/feedtree/core/client/Client.java (revision 184) +++ /feedtree/trunk/src/net/feedtree/core/client/Client.java (revision 189) @@ -280,4 +280,23 @@ + localHost + " port " + port + "]"); + try { + + // Construct the node factory given the *local* + // address to bind to (this allows us to select among + // multiple network interfaces on the client). Note + // that we're not yet using the (detected) external + // IP; that comes later. + factory = new SocketPastryNodeFactory( + new RandomNodeIdFactory(g_pastryEnv), + localHost, port, g_pastryEnv); + + } catch (IOException exc) { + Logger.global.severe("error: couldn't create node factory; bailing"); + status.notifyStatus(ClientStatus.STATUS_FATAL_ERROR, + "Error loading Pastry network code"); + + return null; + } + if (bootHost != "") { // NAT-detection code loosely cribbed from ePOST @@ -304,23 +323,4 @@ g_publicNodeAddress = new InetSocketAddress(natAddr, port); - try { - - // Construct the node factory given the *local* - // address to bind to (this allows us to select among - // multiple network interfaces on the client). Note - // that we're not yet using the (detected) external - // IP; that comes later. - factory = new SocketPastryNodeFactory( - new RandomNodeIdFactory(g_pastryEnv), - natAddr, port, g_pastryEnv); - - } catch (IOException exc) { - Logger.global.severe("error: couldn't create node factory; bailing"); - status.notifyStatus(ClientStatus.STATUS_FATAL_ERROR, - "Error loading Pastry network code"); - - return null; - } - Logger.global.fine("[Contacting bootstrap host " + bootHost + ":" + bootPort + "]"); @@ -375,5 +375,5 @@ status.notifyStatus(ClientStatus.STATUS_STARTING, "Starting new network"); - + node = factory.newNode(null);