-
-
Notifications
You must be signed in to change notification settings - Fork 631
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
Fix chat race condition #1042
Fix chat race condition #1042
Conversation
Don't have hardware to look into this properly, but on the surface, this looks much closer to how I said this stuff should probably work in the first place |
Hi @EpicPlayerA10 @electronicboy, |
Okay, now the latest commit will ensure that chat packets are fully sent. This should get rid of this problem. |
The problem is still there. A player reported me about a kick again today. |
Hmm. I don't know why this is still happening. I have no idea. I think that i did everything correct. |
Is there any progress? Looking forward to it |
I recall looking over this a few times and it generally looked fine, finally have hardware to test, just time; if this can be rebased, I'll try and get to this on the weekend or sometime next week |
Rebased |
The issue
Chat system in velocity has a race condition. When player is sending messages very fast, then a backend server will kick him for
out-of-order chat
.You can test this by installing litematica mod and use the feature called
Paste schematic into world
. Then litematica will send commands very fast and then you get kicked from the proxy. This issue only happens when player is connected to the proxy. When you are connected to the minecraft server directly then the issue disappears.The race condition looks like this:
Flowchart before
You can see here that velocity doesn't wait for packet to be sent. The chat gets out of sync and thats why players are getting kicked from backend server.
Fix
This pull request fixes it by waiting for packets to be sent. Now the flowchart looks like this:
Flowchart after
Related issues