Closed Aaron1011 closed 9 years ago
This resolves issue https://github.com/GlowstoneMC/Glowstone/issues/571
I don't think this needs a variable to be stored 0.01% of the time it will be used. Just pull the value from the bound socket.
Then, I'd just be storing the channel or socket instead. It's not accessible from the main server outside bind()
Then the variable should always be used
Merged in 1311a2a3330e60f9e4da56de4b160fc8b98d4e6f.
Currently, if
port
is set to0
in the config, there's no way to determine the port that the server actually gets bound to.This PR prints out the port that was bound t, and updates
getPort
to return the port actually bound if, if0
was specified.