1
Fork 0
mirror of https://github.com/jech/galene.git synced 2024-12-17 21:05:46 +01:00

Fix race condition with AutoKick.

This commit is contained in:
Juliusz Chroboczek 2024-11-11 16:54:59 +01:00
parent a73c42ce08
commit b103342626
2 changed files with 13 additions and 1 deletions

View file

@ -9,6 +9,8 @@ Galene 0.95.0 (unreleased)
incompatible change.
* Added an id to every chat message, and made it possible to remove
a single chat message.
* Fixed a race condition that prevented operators from joining an
AutoKick group.
15 July 2024: Galene 0.9.1

View file

@ -693,7 +693,17 @@ func autoLockKick(g *Group) {
}
if g.description.Autokick {
go kickall(g, "there are no operators in this group")
// we cannot call kickall, since it requires the group to
// be unlocked. And calling it asynchronously might
// spuriously kick out an operator.
go func(clients []Client) {
for _, c := range clients {
c.Kick(
"", nil,
"there are no operators in this group",
)
}
}(g.getClientsUnlocked(nil))
}
}