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

Handle internal immediate forced disconnects #908

Closed
wants to merge 1 commit into from

Conversation

AmyrAhmady
Copy link
Member

This PR is basically doing what openmultiplayer/RakNet#21 does but properly by handling forced closed connections/disconnects

Quoted explanation from the said PR:

If a player exceeds a network limit (e.g. messageholelimit), the player's IP is banned and the connection is immediately closed by RakNet internally. The open.mp server is by design not notified of connections closed internally by RakNet. This causes three issues. First, the player concerned will remain connected in open.mp as a zombie player. Second, once all player IDs are taken, new players are assigned player ID -1. Third, due to missing array boundary checks in the open.mp server at several places, the server will crash when trying to access an array at index -1. This commit fixes all issues by banning the IP only, which results in a connection time out, of which the open.mp server is notified, which deletes the player accordingly.

@AmyrAhmady
Copy link
Member Author

Fixes #882 and #801

@Hual
Copy link
Collaborator

Hual commented Apr 2, 2024

Any idea what the performance impact of attaching a plugin is? Did you test if the problem is fixed?

@AmyrAhmady
Copy link
Member Author

Closing this, since we found a better solution, available in here: openmultiplayer/RakNet#22

@AmyrAhmady AmyrAhmady closed this Apr 3, 2024
@AmyrAhmady AmyrAhmady deleted the amir/handle-internal-disconnect branch April 3, 2024 02:33
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.

3 participants