fix(storev2/snapshots): Close StateChanges channel in doRestoreSnapshot (#21106)
This commit is contained in:
parent
e507900e45
commit
bc72e34d55
@ -400,7 +400,6 @@ func (m *Manager) doRestoreSnapshot(snapshot types.Snapshot, chChunks <-chan io.
|
||||
|
||||
// chStorage is the channel to pass the KV pairs to the storage snapshotter.
|
||||
chStorage := make(chan *corestore.StateChanges, defaultStorageChannelBufferSize)
|
||||
defer close(chStorage)
|
||||
|
||||
storageErrs := make(chan error, 1)
|
||||
go func() {
|
||||
@ -415,6 +414,7 @@ func (m *Manager) doRestoreSnapshot(snapshot types.Snapshot, chChunks <-chan io.
|
||||
if err != nil {
|
||||
return errorsmod.Wrap(err, "multistore restore")
|
||||
}
|
||||
close(chStorage)
|
||||
|
||||
for {
|
||||
if nextItem.Item == nil {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user