Fix race condition with AutoKick.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
+11
-1
@@ -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))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user