Skip to content

Commit

Permalink
Actually print the port that was bound, instead of the one from the c…
Browse files Browse the repository at this point in the history
…onfig (#644)

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 d8a9c52)
  • Loading branch information
TechnicJelle authored Jan 19, 2025
1 parent b3dfc47 commit 9d13f59
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
Expand Down

0 comments on commit 9d13f59

Please sign in to comment.