diff --git a/src/dorkbox/network/Server.java b/src/dorkbox/network/Server.java index e51a2710..a8cdae86 100644 --- a/src/dorkbox/network/Server.java +++ b/src/dorkbox/network/Server.java @@ -113,7 +113,11 @@ class Server extends EndPointServer { localChannelName = config.localChannelName; if (config.host == null) { + // we set this to "0.0.0.0" so that it is clear that we are trying to bind to that address. hostName = "0.0.0.0"; + + // make it clear that this is what we do (configuration wise) so that variable examination is consistent + config.host = hostName; } else { hostName = config.host; @@ -216,7 +220,7 @@ class Server extends EndPointServer { serializationManager)); // have to check options.host for null. we don't bind to 0.0.0.0, we bind to "null" to get the "any" address! - if (config.host != null) { + if (hostName.equals("0.0.0.0")) { tcpBootstrap.localAddress(hostName, tcpPort); } else {