1
1
mirror of https://github.com/go-gitea/gitea synced 2024-12-25 01:54:26 +00:00

Fix missing unlock in uniquequeue (#9791)

This commit is contained in:
zeripath 2020-01-16 00:09:31 +00:00 committed by Antoine GIRARD
parent 6d1f7e90cf
commit dbe6136348

View File

@ -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{}{}