Skip to content

Fixed: several connection logic issues#906

Merged
AmyrAhmady merged 4 commits intoopenmultiplayer:masterfrom
uifdev:connection-logic-fixes
Apr 4, 2024
Merged

Fixed: several connection logic issues#906
AmyrAhmady merged 4 commits intoopenmultiplayer:masterfrom
uifdev:connection-logic-fixes

Conversation

@uifdev
Copy link
Copy Markdown
Contributor

@uifdev uifdev commented Mar 31, 2024

  1. Clients weren't kicked if the client version doesn't match the server version.
  2. Clients were flagged as logged in to the game regardless of the result of OnPeerConnect, meaning they wouldn't be dropped in the event of a failure.

Comment thread Server/Components/LegacyNetwork/legacy_network_impl.cpp
@atomlin-git
Copy link
Copy Markdown
Contributor

I don't think these changes make any sense. A kick for an incorrect version will be executed one way or another due to the return of nullptr. Regarding the fact that clients were marked as entering the game, this does not pose any problem. One way or another, if the player does not take the necessary actions, he will be kicked lower.

@uifdev
Copy link
Copy Markdown
Contributor Author

uifdev commented Apr 1, 2024

A kick for an incorrect version will be executed one way or another due to the return of nullptr.

No, it won't. This PR fixes precisely that bug. Don't comment if you can't read or understand the code.

@Hual Re-added kick calls as per your suggestion, so invalid clients get kicked ASAP.

@AmyrAhmady
Copy link
Copy Markdown
Member

Syncing raknet here, since it's related. changes are from this PR: openmultiplayer/RakNet#22

Hual
Hual previously approved these changes Apr 3, 2024
AmyrAhmady
AmyrAhmady previously approved these changes Apr 4, 2024
ksenonadv
ksenonadv previously approved these changes Apr 4, 2024
@AmyrAhmady AmyrAhmady dismissed stale reviews from ksenonadv, Hual, and themself via 7d65932 April 4, 2024 13:07
@AmyrAhmady AmyrAhmady merged commit 6941fee into openmultiplayer:master Apr 4, 2024
@uifdev uifdev deleted the connection-logic-fixes branch April 4, 2024 14:24
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

Successfully merging this pull request may close these issues.

5 participants