[client] Fix state manager race conditions (#2890)

This commit is contained in:
Viktor Liu
2024-11-15 20:05:26 +01:00
committed by GitHub
parent a1c5287b7c
commit 121dfda915
7 changed files with 118 additions and 100 deletions

View File

@ -297,7 +297,7 @@ func (e *Engine) Stop() error {
if err := e.stateManager.Stop(ctx); err != nil {
return fmt.Errorf("failed to stop state manager: %w", err)
}
if err := e.stateManager.PersistState(ctx); err != nil {
if err := e.stateManager.PersistState(context.Background()); err != nil {
log.Errorf("failed to persist state: %v", err)
}