Drop a guest's GamesServ games on disconnect so a recycled uid can't inherit one
All checks were successful
CI / check (push) Successful in 5m39s

This commit is contained in:
Jean Chevronnet 2026-07-21 10:23:52 +00:00
parent 62b275fd01
commit 9e8449b40d
No known key found for this signature in database
3 changed files with 42 additions and 3 deletions

View file

@ -737,6 +737,11 @@ impl Engine {
// Forget a user who left the network (QUIT or KILL): drop their membership,
// any half-finished SASL exchange, and their pending nick-protection timer.
fn forget_user(&mut self, uid: &str) {
// Let services drop state keyed on this uid (e.g. GamesServ guest games)
// before the uid can be recycled to a new connection.
for svc in self.services.iter_mut() {
svc.on_user_quit(uid);
}
let chans = self.network.channels_of(uid);
self.network.user_quit(uid);
for c in &chans {