From d0db485c2496c8889d174da386621b523c876080 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=B0=D0=BC=D1=8F=D0=BD=20=D0=9C=D0=B8=D0=BD=D0=BA?= =?UTF-8?q?=D0=BE=D0=B2?= Date: Wed, 18 May 2022 08:08:47 -0500 Subject: [PATCH] fix: Bosh configuration when bosh URI contains IP address. --- .../java/org/jivesoftware/smack/bosh/BOSHConfiguration.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/smack-bosh/src/main/java/org/jivesoftware/smack/bosh/BOSHConfiguration.java b/smack-bosh/src/main/java/org/jivesoftware/smack/bosh/BOSHConfiguration.java index f6fe91544..c310c25b3 100644 --- a/smack-bosh/src/main/java/org/jivesoftware/smack/bosh/BOSHConfiguration.java +++ b/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 getHttpHeaders() {