Skip to content

Disappearing servers fix

Monster Iestyn requested to merge disappearing-servers-fix into master

This fixes the bug encountered in SRB2Kart where, in the in-game server list menu, the number of servers listed for a room can shrink when you refresh. If you leave the menu and then reenter, the full list reappears again. This bug I hear also applies to vanilla (not anyone can test that right now) so I'm making the fix in this repo rather than Kart's.

If you want to know details on why it happens (and you know something of how the netcode works), it's because the game makes connections to all servers when sending ASKINFO packets to them, ...but never closes the connections if you never hear anything back from each server (usually if they haven't forwarded your ports). At least, until you exit the menu. I've fixed this by "disconnecting" you from each server you send ASKINFO packets to; you're going to reconnect to them when you get SERVERINFO packets later anyway, so as far as I can tell this should be fine?

If you know absolutely nothing of SRB2's netcode and you read the above and didn't understand at all, I apologise for possibly melting your brains.

Merge request reports