Use the hostname stored in the Client rather than the IP address in case we're

using a proxy, in which case we'll send the non-proxy hostname in the
bootstrap data.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6530 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Andrzej Kapolka
2011-03-10 23:18:22 +00:00
parent 4acf173bf3
commit b205f60d1c
@@ -888,8 +888,7 @@ public class BlockingCommunicator extends Communicator
protected boolean connect (int port)
throws IOException
{
_datagramChannel.connect(new InetSocketAddress(
_channel.socket().getInetAddress(), port));
_datagramChannel.connect(new InetSocketAddress(_client.getHostname(), port));
for (int ii = 0; ii < DATAGRAM_ATTEMPTS_PER_PORT; ii++) {
// send a ping datagram
sendDatagram(new PingRequest(Transport.UNRELIABLE_UNORDERED));