diff --git a/xmppserver/src/main/java/org/jivesoftware/openfire/net/SocketUtil.java b/xmppserver/src/main/java/org/jivesoftware/openfire/net/SocketUtil.java index 816f322d27..061d1f42e5 100644 --- a/xmppserver/src/main/java/org/jivesoftware/openfire/net/SocketUtil.java +++ b/xmppserver/src/main/java/org/jivesoftware/openfire/net/SocketUtil.java @@ -91,11 +91,11 @@ public static Map.Entry createSocketToXmppDomain( String xmppDo /* * Fallback: If no dns entry was found for xmpp service subdomain, try the xmpp (parent) domain itself. * */ - if (USE_FALLBACK.getValue()&&tryparent&&realHostname.contains(".")) + if (USE_FALLBACK.getValue()&&tryparent&&xmppDomain.contains(".")) { - String realHostnameWithoutSubdomain = realHostname.substring(realHostname.indexOf(".")+1); - Log.info("Try to connect to parent domain {}:{}",realHostnameWithoutSubdomain,port); - return createSocketToXmppDomain(realHostnameWithoutSubdomain,port,false); + String xmppDomainWithoutSubdomain = xmppDomain.substring(xmppDomain.indexOf(".")+1); + Log.info("Try to connect to parent domain {}:{}",xmppDomainWithoutSubdomain,port); + return createSocketToXmppDomain(xmppDomainWithoutSubdomain,port,false); } } }