Disconnect State Fixes (#13616)
Replaces the processedDisconnect flag and executeBlocking cleanup with a force kill flag processed by the connection listener tick. executeBlocking(connection::handleDisconnection) did not actually Work, as the the channel is still open at that point because the disconnect packet hasn't been flushed. Replaced with handleConnectionDisconnectOnNextTick, which the connection listener processes on the next tick. processedDisconnect was an old flag preventing double disconnect. The same protection is now provided by vanilla's disconnectionHandled check on Connection. Drops the SPIGOT-924 player.doTick() call on quit. This is an ancient spigot bug fix that causes issues and weird event fires whilst the player is disconnected. Removes the login side disconnecting flag and the matching tick guard, since the connection now closes properly on its own. The login disconnect path moves to disconnectAsync so it doesn't block on IO.
O
Owen committed
8021488ef48a4aae5246cd3d2f97b8573bffdad9
Parent: 182b2f8
Committed by GitHub <noreply@github.com>
on 4/25/2026, 10:06:21 PM