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
1 changed files with 2 additions and 3 deletions

View File

@ -583,9 +583,8 @@ public class XMPPTCPConnection extends AbstractXMPPConnection {
SmackFuture.SocketFuture socketFuture = new SmackFuture.SocketFuture(socketFactory);
final InetAddress inetAddress = inetAddresses.next();
final String inetAddressAndPort = inetAddress + " at port " + 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);
try {
@ -598,7 +597,7 @@ public class XMPPTCPConnection extends AbstractXMPPConnection {
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
this.host = host;
this.port = port;