1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-05 10:07:22 +00:00

Upgrade levelqueue to v0.4.0 (#16560)

Fix #16546
This commit is contained in:
Lunny Xiao
2021-07-27 23:55:48 +08:00
committed by GitHub
parent 4b6370c46d
commit 5b2e2d29ca
6 changed files with 13 additions and 2 deletions

View File

@ -295,6 +295,11 @@ func (queue *Queue) LHandle(h func([]byte) error) error {
// Close closes the queue (and the underlying db is set to closeUnderlyingDB)
func (queue *Queue) Close() error {
queue.highLock.Lock()
queue.lowLock.Lock()
defer queue.highLock.Unlock()
defer queue.lowLock.Unlock()
if !queue.closeUnderlyingDB {
queue.db = nil
return nil