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
All checks were successful
CI / check (push) Successful in 5m39s
This commit is contained in:
parent
62b275fd01
commit
9e8449b40d
3 changed files with 42 additions and 3 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue