Skip to content

DisconnectPacket not being forwarded to a client in ConfigSessionHandler, TransitionSessionHandler #1603

@HP888

Description

@HP888

Expected Behavior

Packet should be properly forwarded to client to ensure it gets the disconnect reason.


If this helps in any way, after adding this myself:

MinecraftConnection playerConnection = this.serverConn.getPlayer().getConnection();
playerConnection.closeWith(DisconnectPacket.create(packet.getReason().getComponent(), playerConnection.getProtocolVersion(), playerConnection.getState()));

to the both session handlers, the issue has been resolved. Haven't encountered any side effects by using it there.


Or is there some specific reason it's not being forwarded?

Actual Behavior

If the backend server sends DisconnectPacket in the CONFIGURATION state (before or after clientbound FinishedUpdatePacket) the client is not getting the disconnect reason, and thus it's stuck on Reconfiguring... GUI title.

Steps to Reproduce

Send DisconnectPacket to the client in CONFIGURATION state on a backend server.

Plugin List

none

Velocity Version

[01:06:24 INFO]: Velocity 3.4.0-SNAPSHOT (git-81deb1ff-b521)
[01:06:24 INFO]: Copyright 2018-2023 Velocity Contributors. Velocity jest objęty licencją na warunkach GNU General Public License v3.
[01:06:24 INFO]: PaperMC - GitHub

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions