Skip to content
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

Unregister of MasterServer happens per IP, instead of per session_key #7829

Open
TrueBrain opened this issue Nov 10, 2019 · 0 comments
Open

Unregister of MasterServer happens per IP, instead of per session_key #7829

TrueBrain opened this issue Nov 10, 2019 · 0 comments
Labels

Comments

@TrueBrain
Copy link
Member

@TrueBrain TrueBrain commented Nov 10, 2019

Version of OpenTTD

Since protocol v2

Expected result

When closing a server, send only a single packet to unregister the server.

Actual result

For every IP the server was listening on, an unregister packet is send.

Steps to reproduce

Start and stop a server. Look at the network traffic (set debug of 'net' to 9).

Backstory

In earlier version of OpenTTD, every IP resulted in a new server entry on the server listing. Of course we didn't want that, and with the creation of protocol v2 this was solved. But here a mix of old and new code stayed together. Unregistering is done per IP, but when registering you get assigned a session_key, which is unique to your server (no matter how many IPs). Every IP you register with the same session_key, is added together. So there no longer is any need to unregister every IP. Just the session_key, once.

Together with #7828, a better approach might be to create a protocol v3, and fix these issues.

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

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.