mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-21 22:02:06 +01:00
Only create the socket once
in XMPPTCPConnection.connectUsingConfiguration().
This commit is contained in:
parent
ac0c05be04
commit
7845f21465
1 changed files with 1 additions and 1 deletions
|
@ -545,11 +545,11 @@ public class XMPPTCPConnection extends AbstractXMPPConnection {
|
|||
if (socketFactory == null) {
|
||||
socketFactory = SocketFactory.getDefault();
|
||||
}
|
||||
socket = socketFactory.createSocket();
|
||||
for (HostAddress hostAddress : hostAddresses) {
|
||||
Iterator<InetAddress> inetAddresses = null;
|
||||
String host = hostAddress.getFQDN();
|
||||
int port = hostAddress.getPort();
|
||||
socket = socketFactory.createSocket();
|
||||
try {
|
||||
inetAddresses = Arrays.asList(InetAddress.getAllByName(host)).iterator();
|
||||
if (!inetAddresses.hasNext()) {
|
||||
|
|
Loading…
Reference in a new issue