From bbdcb530395435125562c2a3260040af62cd4c8d Mon Sep 17 00:00:00 2001 From: Mike Thomas Date: Tue, 18 Jul 2006 05:24:22 +0000 Subject: [PATCH] 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 --- src/java/com/threerings/presents/client/Communicator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/java/com/threerings/presents/client/Communicator.java b/src/java/com/threerings/presents/client/Communicator.java index db84a55e6..b828f9d43 100644 --- a/src/java/com/threerings/presents/client/Communicator.java +++ b/src/java/com/threerings/presents/client/Communicator.java @@ -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;