Merge pull request #526 from damencho/fix-bosh-ip-address-4.4

fix: Bosh configuration when bosh URI contains IP address.
master
Florian Schmaus 3 months ago committed by GitHub
commit 9b6e209b5f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      smack-bosh/src/main/java/org/jivesoftware/smack/bosh/BOSHConfiguration.java

@ -77,7 +77,9 @@ public final class BOSHConfiguration extends ConnectionConfiguration {
}
public URI getURI() throws URISyntaxException {
return new URI((https ? "https://" : "http://") + this.host + ":" + this.port + file);
return new URI((https ? "https://" : "http://")
+ (this.host != null ? this.host : this.hostAddress)
+ ":" + this.port + file);
}
public Map<String, String> getHttpHeaders() {

Loading…
Cancel
Save