mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-09-10 17:49:38 +02:00
Move DNS resolving into connect()
It was misplaced in ConnectionConfiguration anyways, as the sole instantiation of a ConnectionConfiguration should not cause any network I/O.
This commit is contained in:
parent
dbab9b8995
commit
d349940537
7 changed files with 56 additions and 64 deletions
|
@ -420,6 +420,12 @@ public class TCPConnection extends XMPPConnection {
|
|||
|
||||
private void connectUsingConfiguration(ConnectionConfiguration config) throws SmackException, IOException {
|
||||
Exception exception = null;
|
||||
try {
|
||||
config.maybeResolveDns();
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw new SmackException(e);
|
||||
}
|
||||
Iterator<HostAddress> it = config.getHostAddresses().iterator();
|
||||
List<HostAddress> failedAddresses = new LinkedList<HostAddress>();
|
||||
while (it.hasNext()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue