1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-11-25 07:42:06 +01:00

Use InetSocketAddress in log message in XMPPTCPConnection

The inetAddressAndPort String is redundant since
a2743549b8, because we now construct the
InetSocketAddress earlier and can hence use it in the log statement.
This commit is contained in:
Florian Schmaus 2018-12-21 12:05:14 +01:00
parent a2743549b8
commit b9c12d44c3

View file

@ -583,9 +583,8 @@ public class XMPPTCPConnection extends AbstractXMPPConnection {
SmackFuture.SocketFuture socketFuture = new SmackFuture.SocketFuture(socketFactory); SmackFuture.SocketFuture socketFuture = new SmackFuture.SocketFuture(socketFactory);
final InetAddress inetAddress = inetAddresses.next(); final InetAddress inetAddress = inetAddresses.next();
final String inetAddressAndPort = inetAddress + " at port " + port;
final InetSocketAddress inetSocketAddress = new InetSocketAddress(inetAddress, port); final InetSocketAddress inetSocketAddress = new InetSocketAddress(inetAddress, port);
LOGGER.finer("Trying to establish TCP connection to " + inetAddressAndPort); LOGGER.finer("Trying to establish TCP connection to " + inetSocketAddress);
socketFuture.connectAsync(inetSocketAddress, timeout); socketFuture.connectAsync(inetSocketAddress, timeout);
try { try {
@ -598,7 +597,7 @@ public class XMPPTCPConnection extends AbstractXMPPConnection {
break innerloop; break innerloop;
} }
} }
LOGGER.finer("Established TCP connection to " + inetAddressAndPort); LOGGER.finer("Established TCP connection to " + inetSocketAddress);
// We found a host to connect to, return here // We found a host to connect to, return here
this.host = host; this.host = host;
this.port = port; this.port = port;