core/rawdb: wait for background freezing to exit when closing freezer (#22878)
This commit is contained in:
committed by
GitHub
parent
67e7f61af7
commit
bb9f9ccf4f
@ -197,7 +197,11 @@ func NewDatabaseWithFreezer(db ethdb.KeyValueStore, freezer string, namespace st
|
||||
}
|
||||
// Freezer is consistent with the key-value database, permit combining the two
|
||||
if !frdb.readonly {
|
||||
go frdb.freeze(db)
|
||||
frdb.wg.Add(1)
|
||||
go func() {
|
||||
frdb.freeze(db)
|
||||
frdb.wg.Done()
|
||||
}()
|
||||
}
|
||||
return &freezerdb{
|
||||
KeyValueStore: db,
|
||||
|
Reference in New Issue
Block a user