fix WARNING: DATA RACE issue when multiple goroutines access the backend concurrently
This commit is contained in:
@ -419,6 +419,8 @@ func (b *backend) run() {
|
||||
func (b *backend) Close() error {
|
||||
close(b.stopc)
|
||||
<-b.donec
|
||||
b.mu.Lock()
|
||||
defer b.mu.Unlock()
|
||||
return b.db.Close()
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user