mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-09-10 17:49:38 +02:00
Always lookup DNS SRV RR on connect()
This commit is contained in:
parent
363354f237
commit
1cf4681581
2 changed files with 13 additions and 13 deletions
|
@ -113,9 +113,16 @@ public class BOSHConfiguration extends ConnectionConfiguration {
|
|||
if (file.charAt(0) != '/') {
|
||||
file = '/' + file;
|
||||
}
|
||||
HostAddress hostAddress = hostAddresses.get(0);
|
||||
String host = hostAddress.getFQDN();
|
||||
int port = hostAddress.getPort();
|
||||
String host;
|
||||
int port;
|
||||
if (hostAddresses != null) {
|
||||
HostAddress hostAddress = hostAddresses.get(0);
|
||||
host = hostAddress.getFQDN();
|
||||
port = hostAddress.getPort();
|
||||
} else {
|
||||
host = getServiceName();
|
||||
port = 80;
|
||||
}
|
||||
return new URI((ssl ? "https://" : "http://") + host + ":" + port + file);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue