Commit f2a95704 authored by Guus der Kinderen's avatar Guus der Kinderen Committed by akrherz

OF-1301: Don't fail on default FQDN calculation. (#760)

parent 07534897
...@@ -62,9 +62,15 @@ public class XMPPServerInfoImpl implements XMPPServerInfo { ...@@ -62,9 +62,15 @@ public class XMPPServerInfoImpl implements XMPPServerInfo {
@Override @Override
public String getHostname() public String getHostname()
{ {
final String fqdn = JiveGlobals.getProperty( "xmpp.fqdn" );
if ( fqdn != null && !fqdn.trim().isEmpty() )
{
return fqdn.trim().toLowerCase();
}
try try
{ {
return JiveGlobals.getProperty( "xmpp.fqdn", InetAddress.getLocalHost().getCanonicalHostName() ).toLowerCase(); return InetAddress.getLocalHost().getCanonicalHostName().toLowerCase();
} }
catch (UnknownHostException ex) catch (UnknownHostException ex)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment