Paper
Paper copied to clipboard
Server reacts badly to any packets from client-side after shutdown process begins, preemptively dropping connections
Expected behavior
In the shutdown process, online players should get disconnected exactly when "Notch lost connection: Server closed" appears in console log, not at any point in time before that.
Because of the nature of the early disconnect, proxies (such as BungeeCord) aren't able to handle the disconnect as a server kick, and disconnect the player from the whole network.
Observed/Actual behavior
Players get disconnected almost immediately after the shutdown process begins, and kick messages aren't actually kicking anyone, since players are already disconnected. This is apparently caused by client-side packets that are sent to the server and lead to this issue being reproduced: https://bugs.mojang.com/browse/MC-142590
Steps/models to reproduce
For vanilla:
- Fly up, begin falling down
- Type /stop while falling down
- Get "Disconnected", instead of "Server closed" Custom:
- Using any plugin, delay full shutdown for a couple seconds (like using Thread.sleep in onDisable)
- Observe time difference between players being dropped with "Disconnected" and actual kicks in console for "Server closed"
Plugin and Datapack List
Doesn't matter
Paper version
[07:00:05 INFO]: This server is running Paper version git-Paper-199 (MC: 1.19.2) (Implementing API version 1.19.2-R0.1-SNAPSHOT) (Git: 77a50b9) You are 7 version(s) behind
Other
Link to the discord talk: https://discord.com/channels/289587909051416579/289587909051416579/1029582828243005520 Video showcasing the problem: https://cdn.discordapp.com/attachments/289587909051416579/1029584461668548728/paper_shutdown.mp4
Can reproduce as of 1.19.2