Fix missing unlock in uniquequeue (#9790)

tokarchuk/v1.17
zeripath 5 years ago committed by Lauris BH
parent 9343d2fc85
commit e7923c4bc0
  1. 1
      modules/sync/unique_queue.go

@ -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…
Cancel
Save