Print out extra information when the strange "invalid argument" socket
connect exception gets thrown. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3462 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -434,7 +434,13 @@ public class Communicator
|
|||||||
|
|
||||||
// establish a socket connection to said server
|
// establish a socket connection to said server
|
||||||
Log.debug("Connecting [host=" + host + ", port=" + port + "].");
|
Log.debug("Connecting [host=" + host + ", port=" + port + "].");
|
||||||
_channel = SocketChannel.open(new InetSocketAddress(host, port));
|
InetSocketAddress addr = new InetSocketAddress(host, port);
|
||||||
|
try {
|
||||||
|
_channel = SocketChannel.open(addr);
|
||||||
|
} catch (IOException ioe) {
|
||||||
|
Log.warning("Error opening [addr=" + addr + "].");
|
||||||
|
throw ioe; // rethrow
|
||||||
|
}
|
||||||
_channel.configureBlocking(true);
|
_channel.configureBlocking(true);
|
||||||
|
|
||||||
// our messages are framed (preceded by their length), so we
|
// our messages are framed (preceded by their length), so we
|
||||||
|
|||||||
Reference in New Issue
Block a user