SpigotMC / BungeeCord

BungeeCord, the 6th in a generation of server portal suites. Efficiently proxies and maintains connections and transport between multiple Minecraft servers.
https://www.spigotmc.org/go/bungeecord
Other
1.57k stars 1.1k forks source link

Optimistic ack leads to timeout #1720

Closed DarkSeraphim closed 1 month ago

DarkSeraphim commented 8 years ago

BungeeCord optimistically sets dimensionChange to false after an initial connect or server switch, which causes disconnect packets being sent to the client as chat messages. However, in the case that a connection did not went through (i.e. the server being directed to an online server) or when the disconnect is delayed (loading data in the AsyncPlayerPreLoginEvent, later disallowing) will cause a delayed kick packet.

But as BungeeCord set the dimensionChange to false, it will happily convert that kick packet into a message, which is never seen by the client (because who reads chat messages whenever they're stuck in world loading or logging in), thus causing the client to wait for an eternity (thank god for timeouts, but that's still an arbitrary one)

Rather, have it set to true when there is at least some form of confirmation that the client is past such a screen (i.e. the downloading world screen disappears after a player position packet has been sent).

EDIT: the "online server" part was a wrong fallback - it should be going to another part of the network, which also happened to be offline (yey). For that reason, it fell back to a server it should've never reached, causing the "Nope, it's online" from BungeeCord. Normally this isn't a real problem, but in combination with the user being stuck in world loading and exceptions being reported as messages rather than kicks, this actually caused one nice issue which I could only discover by actually watching the incoming packet stream from the client end.

csh commented 8 years ago

A bit of a pain indeed. Explains why I was randomly getting messages I was sure I wasn't meant to be getting.

exception commented 8 years ago

Like @Fireflies said, this is bringing some issues.

Outfluencer commented 1 month ago

i think this is not a problem anymore, if it is, reopen