From e7923c4bc06ecf887a9405e9c7cc8e7e482762d4 Mon Sep 17 00:00:00 2001 From: zeripath Date: Wed, 15 Jan 2020 21:58:33 +0000 Subject: [PATCH] Fix missing unlock in uniquequeue (#9790) --- modules/sync/unique_queue.go | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/sync/unique_queue.go b/modules/sync/unique_queue.go index 14644c7d4e0c..d41726b5af93 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{}{}