summaryrefslogtreecommitdiffstats
path: root/modules/sync/unique_queue.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/sync/unique_queue.go')
-rw-r--r--modules/sync/unique_queue.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/sync/unique_queue.go b/modules/sync/unique_queue.go
index 14644c7d4e..d41726b5af 100644
--- a/modules/sync/unique_queue.go
+++ b/modules/sync/unique_queue.go
@@ -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{}{}