Skip to content

Server is not accepting the full range of ports #66

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
SirStone opened this issue Mar 26, 2023 · 2 comments
Closed

Server is not accepting the full range of ports #66

SirStone opened this issue Mar 26, 2023 · 2 comments
Assignees

Comments

@SirStone
Copy link
Collaborator

Describe the bug
The range ports for a standard computer is 1-65535 but the server uses a Short to store the port so the port can't have a port over the maximum positive short, that is 32767, leaving out 65535-32767=32768 unusable ports

To Reproduce
FAIL
launch the server with the maximum short+1=32768 and it will fail wiht the message "Invalid value for option '--port': '32768' is not a short"
java -jar robocode-tankroyale-server-0.19.1.jar --botSecrets veuogdpgjtd --controllerSecrets ifrafjbrpcg --port 32768

NO FAIL
launch the server with the maximum short = 32767 and the server will start ok
java -jar robocode-tankroyale-server-0.19.1.jar --botSecrets veuogdpgjtd --controllerSecrets ifrafjbrpcg --port 32767

Expected behavior
The server should be able to use any port out of the full range

Screenshots
Screenshot 2023-03-26 at 11 34 16

@flemming-n-larsen
Copy link
Contributor

@SirStone Thank you for reporting this. I will fix it ASAP.

@flemming-n-larsen
Copy link
Contributor

Fixed with the 0.19.2 release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants