]> git.deb.at Git - rhonda/impostor.git/commit
Clean up clients that refuse to quit properly
authorminiduikboot <mini@duikbo.at>
Sun, 26 May 2024 20:05:21 +0000 (22:05 +0200)
committerminiduikboot <mini@duikbo.at>
Sun, 26 May 2024 20:05:21 +0000 (22:05 +0200)
commit661421da5a30b3f57a1490d6d2c35898495ba5aa
tree288f860087ac4acab3a8f32cb56d90a60fdfad29
parentf1f5185f10481bb8ff59647eaf45bf5c0657ed46
Clean up clients that refuse to quit properly

When a player is kicked or banned from a game, the client is expected to
disconnect in response. When they decide not to *or* the disconnect
packet is lost, Impostor just silently disposes of the connection.
This does not remove them from ClientManager, which is how I tracked
this bug down.

By sending them a proper disconnect message, clients should have
received *a* disconnection message before dropping their connection.

Future work should split this entire method in removing players from a
game and processing kick/bans because the latter feature is not relevant
for other callers of this method.
src/Impostor.Server/Net/State/Game.State.cs