mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-20 20:07:03 +01:00
Fix missing unlock in uniquequeue (#9790)
This commit is contained in:
parent
9343d2fc85
commit
e7923c4bc0
1 changed files with 1 additions and 0 deletions
|
@ -82,6 +82,7 @@ func (q *UniqueQueue) AddFunc(id interface{}, fn func()) {
|
||||||
idStr := com.ToStr(id)
|
idStr := com.ToStr(id)
|
||||||
q.table.lock.Lock()
|
q.table.lock.Lock()
|
||||||
if _, ok := q.table.pool[idStr]; ok {
|
if _, ok := q.table.pool[idStr]; ok {
|
||||||
|
q.table.lock.Unlock()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
q.table.pool[idStr] = struct{}{}
|
q.table.pool[idStr] = struct{}{}
|
||||||
|
|
Loading…
Reference in a new issue