1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-09-09 09:09:38 +02:00

proxy: make it the caller's reponsibility to close the socket

This makes the code shorter as there is now a single place where the
socket should be closed.
This commit is contained in:
Florian Schmaus 2019-11-18 17:44:08 +01:00
parent 7b5186f651
commit be2fc23f41
4 changed files with 123 additions and 151 deletions

View file

@ -606,6 +606,7 @@ public class XMPPTCPConnection extends AbstractXMPPConnection {
try {
proxyInfo.getProxySocketConnection().connect(socket, host, port, timeout);
} catch (IOException e) {
CloseableUtil.maybeClose(socket, LOGGER);
hostAddress.setException(e);
failedAddresses.add(hostAddress);
continue;