Browse Source

Fix missing unlock in uniquequeue (#9790)

tags/v1.10.5
zeripath 4 years ago
parent
commit
e7923c4bc0
1 changed files with 1 additions and 0 deletions
  1. 1
    0
      modules/sync/unique_queue.go

+ 1
- 0
modules/sync/unique_queue.go View File

@@ -82,6 +82,7 @@ func (q *UniqueQueue) AddFunc(id interface{}, fn func()) {
idStr := com.ToStr(id)
q.table.lock.Lock()
if _, ok := q.table.pool[idStr]; ok {
q.table.lock.Unlock()
return
}
q.table.pool[idStr] = struct{}{}

Loading…
Cancel
Save