From eecd6e88b6febed341b7d8c2cd67baf77799cc6b Mon Sep 17 00:00:00 2001 From: TechnicJelle <22576047+TechnicJelle@users.noreply.github.com> Date: Sun, 19 Jan 2025 17:28:53 +0100 Subject: [PATCH] Actually print the port that was bound, instead of the one from the config In the case of binding to port 0, this will print the actually bound port, instead of the `0` that's in the configuration file. (cherry picked from commit d8a9c5223aefde72f3520c57582d6b41d4ad581c) --- .../java/de/bluecolored/bluemap/common/web/http/Server.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/src/main/java/de/bluecolored/bluemap/common/web/http/Server.java b/common/src/main/java/de/bluecolored/bluemap/common/web/http/Server.java index 25e09b37c..2e2924b7f 100644 --- a/common/src/main/java/de/bluecolored/bluemap/common/web/http/Server.java +++ b/common/src/main/java/de/bluecolored/bluemap/common/web/http/Server.java @@ -55,7 +55,7 @@ public void bind(SocketAddress address) throws IOException { this.server.add(server); if (checkIfBoundToAllInterfaces(address)) { - Logger.global.logInfo("WebServer bound to all network interfaces on port " + ((InetSocketAddress) address).getPort()); + Logger.global.logInfo("WebServer bound to all network interfaces on port " + ((InetSocketAddress) server.getLocalAddress()).getPort()); } else { Logger.global.logInfo("WebServer bound to: " + server.getLocalAddress()); }