Velocity icon indicating copy to clipboard operation
Velocity copied to clipboard

Fix config phase packets getting lost

Open valaphee opened this issue 9 months ago • 2 comments

When the config-phase is initiated externally, packets are getting lost, as there is no connectionInFlight.

This is most noticeable with PluginMessagePacket as some client-only mods initiate their state in the config phase. The servers request is receipt, but the client has no way to acknowledge the pm.

One common scenario where it would occur is when you chain multiple Velocity servers. But it should be the expected behavior nonetheless.

valaphee avatar May 05 '24 22:05 valaphee

When the config-phase is initiated externally, packets are getting lost, as there is no connectionInFlight.

This is most noticeable with PluginMessagePacket as some client-only mods initiate their state in the config phase. The servers request is receipt, but the client has no way to acknowledge the pm.

One common scenario where it would occur is when you chain multiple Velocity servers. But it should be the expected behavior nonetheless.

Does this theoretically resolve #1251?

R00tB33rMan avatar May 11 '24 16:05 R00tB33rMan

When the config-phase is initiated externally, packets are getting lost, as there is no connectionInFlight. This is most noticeable with PluginMessagePacket as some client-only mods initiate their state in the config phase. The servers request is receipt, but the client has no way to acknowledge the pm. One common scenario where it would occur is when you chain multiple Velocity servers. But it should be the expected behavior nonetheless.

Does this theoretically resolve #1251?

Shouldn't impact this issue. At first this PR only impacts client -> server packets, and only normally unrelevant packets. (at least when you don't use modded Minecraft)

valaphee avatar May 12 '24 12:05 valaphee

Closed in favour of #1326 as this is sending packets in the wrong direction

electronicboy avatar May 23 '24 18:05 electronicboy

connection is the clientbound connection, and this is the proxy handler acting as client? But the other PR is probably a better solution, I'll try.

But this definitely works, as we use a client mod and the handshake worked correctly afterwards.

valaphee avatar May 24 '24 15:05 valaphee

ClientConfigSessionHandler is receiving packets from the client, hence why it has logic to write to the connection in-flight, so I'm honestly not sure how this would fix anything scratches head

electronicboy avatar May 24 '24 15:05 electronicboy