beyond-all-reason / spring

A powerful free cross-platform RTS game engine
https://beyond-all-reason.github.io/spring/
Other
190 stars 97 forks source link

ensure timed-out client is disconnected so they can't cause desyncs. #1432

Closed marcushutchings closed 3 months ago

marcushutchings commented 4 months ago

Fixes https://github.com/beyond-all-reason/spring/issues/1406

sprunk commented 4 months ago

How does a timed-out client cause desyncs? Aren't they sending no packets either way?

6AKU66 commented 4 months ago

Not sure if i correct: Client is starting to think that game ended and it's causing problems a lot of problems including a desync.

marcushutchings commented 4 months ago

How does a timed-out client cause desyncs? Aren't they sending no packets either way?

A timed out client triggers a local game end. They aren't supposed to be connected to the server, but in many cases they are which means they are still receiving and sending packets. Having triggered a local-only game end, the game state will match the game state of the other clients.