Initialize Socket in TCP connection when proxy is used

Thanks to Grigory Fedorov for reporting this.
This commit is contained in:
Florian Schmaus 2017-01-08 22:58:23 +01:00
parent bfc14227ca
commit 51d3c31766
1 changed files with 1 additions and 0 deletions

View File

@ -594,6 +594,7 @@ public class XMPPTCPConnection extends AbstractXMPPConnection {
} }
failedAddresses.add(hostAddress); failedAddresses.add(hostAddress);
} else { } else {
socket = socketFactory.createSocket();
StringUtils.requireNotNullOrEmpty(host, "Host of HostAddress " + hostAddress + " must not be null when using a Proxy"); StringUtils.requireNotNullOrEmpty(host, "Host of HostAddress " + hostAddress + " must not be null when using a Proxy");
final String hostAndPort = host + " at port " + port; final String hostAndPort = host + " at port " + port;
LOGGER.finer("Trying to establish TCP connection via Proxy to " + hostAndPort); LOGGER.finer("Trying to establish TCP connection via Proxy to " + hostAndPort);