aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/gitea.com/lunny/levelqueue/set.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/gitea.com/lunny/levelqueue/set.go')
-rw-r--r--vendor/gitea.com/lunny/levelqueue/set.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/vendor/gitea.com/lunny/levelqueue/set.go b/vendor/gitea.com/lunny/levelqueue/set.go
index f5995cb8f1..7e0e65c554 100644
--- a/vendor/gitea.com/lunny/levelqueue/set.go
+++ b/vendor/gitea.com/lunny/levelqueue/set.go
@@ -107,6 +107,8 @@ func (set *Set) Remove(value []byte) (bool, error) {
// Close closes the set (and the underlying db if set to closeUnderlyingDB)
func (set *Set) Close() error {
+ set.lock.Lock()
+ defer set.lock.Unlock()
if !set.closeUnderlyingDB {
set.db = nil
return nil