Skip to content

Commit

Permalink
Cleanup in-memory events before stopping snapshotter
Browse files Browse the repository at this point in the history
Signed-off-by: Swapnil Mhamane <[email protected]>
  • Loading branch information
Swapnil Mhamane committed Aug 22, 2019
1 parent ebec08d commit fb0d8b2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/snapshot/snapshotter/snapshotter.go
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,7 @@ func (ssr *Snapshotter) CollectEventsSincePrevSnapshot(stopCh <-chan struct{}) (
return false, nil
}
case <-stopCh:
ssr.cleanupInMemoryEvents()
return true, nil
}
}
Expand Down Expand Up @@ -441,6 +442,7 @@ func (ssr *Snapshotter) snapshotEventHandler(stopCh <-chan struct{}) error {
return err
}
case <-stopCh:
ssr.cleanupInMemoryEvents()
return nil
}
}
Expand Down

0 comments on commit fb0d8b2

Please sign in to comment.