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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 13 additions and 2 deletions

View file

@ -181,6 +181,8 @@ func (queue *UniqueQueue) Len() int64 {
func (queue *UniqueQueue) Close() error {
_ = queue.q.Close()
_ = queue.set.Close()
queue.set.lock.Lock()
defer queue.set.lock.Unlock()
if !queue.closeUnderlyingDB {
queue.db = nil
return nil