Fix problem where users are unable to connect to certain servers due to their preferred port getting locked into 443, which we aren't actually listening on.

We need to set up the preference interval (but not start it) before we try to open the connection.  Otherwise, we won't have it around if we get a shutdown call during that opening (which can and does happen).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4274 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Mike Thomas
2006-07-18 05:24:22 +00:00
parent 0387014af8
commit bbdcb53039
@@ -466,11 +466,11 @@ public class Communicator
Log.info("Connecting [host=" + host + ", port=" + port + "].");
InetSocketAddress addr = new InetSocketAddress(host, port);
try {
_channel = SocketChannel.open(addr);
synchronized (Communicator.this) {
clearPPI(true);
_prefPortInterval =
new PrefPortInterval(pportKey, port, nextPort);
_channel = SocketChannel.open(addr);
_prefPortInterval.schedule(PREF_PORT_DELAY);
}
break;