mirror of
https://github.com/jech/galene.git
synced 2024-12-18 05:15:49 +01:00
Fix race condition with AutoKick.
This commit is contained in:
parent
a73c42ce08
commit
b103342626
2 changed files with 13 additions and 1 deletions
2
CHANGES
2
CHANGES
|
@ -9,6 +9,8 @@ Galene 0.95.0 (unreleased)
|
||||||
incompatible change.
|
incompatible change.
|
||||||
* Added an id to every chat message, and made it possible to remove
|
* Added an id to every chat message, and made it possible to remove
|
||||||
a single chat message.
|
a single chat message.
|
||||||
|
* Fixed a race condition that prevented operators from joining an
|
||||||
|
AutoKick group.
|
||||||
|
|
||||||
15 July 2024: Galene 0.9.1
|
15 July 2024: Galene 0.9.1
|
||||||
|
|
||||||
|
|
|
@ -693,7 +693,17 @@ func autoLockKick(g *Group) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if g.description.Autokick {
|
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))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue