[BUG] AutoLog: fake logout
Describe the bug
The AutoLog module often get our client logged out, but the server still think we are connected. When connecting again, it shows "You've already joined". This was happening very often on 2b2t.org.
Steps to reproduce
- Login to 2b2t.org
- Switch on AutoLog
- Switch off "toggle off"
- Meet a situation to trigger AutoLog
- You get logged out successfully.
- Then login again instantly
- Keep staying in the same situation to trigger AutoLog
- Then fake logout: you seems logged out on client side, but when you tries to rejoin, server shows you've already joined!
I've died 2 times because of this fake logout bug.
Meteor Version
1.21.10-22
Minecraft Version
1.21.10
Operating System
Linux
Before submitting a bug report
-
[x] This bug wasn't already reported (I have searched bug reports on GitHub).
-
[x] This is a valid bug (I am able to reproduce this on the latest dev build).
After examine the code, i find that original logout logic relies on simulating a server-to-client disconnect packet. I think we should use client side disconnection to guarantee true logout.
Afaik this is a 2b2t-(or perhaps folia)-specific issue. It is easily solved by forcing the server to kick you instead of relying on a traditional disconnect. In most paid clients it is known as an "Illegal Disconnect". My stardust addon is designed for use on 2b2t, and adds this ability as an option to Meteor's built-in AutoLog module, among others.