Skip to content

Commit

Permalink
Fix state race
Browse files Browse the repository at this point in the history
  • Loading branch information
F1bonacc1 committed Sep 17, 2023
1 parent 472713c commit f3ad8b4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/app/process.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,8 @@ func (p *Process) shutDownNoRestart() error {
// perform graceful process shutdown if defined in configuration
func (p *Process) shutDown() error {
if !p.isRunning() {
log.Debug().Msgf("process %s is in state %s not shutting down", p.getName(), p.procState.Status)
state := p.getState()
log.Debug().Msgf("process %s is in state %s not shutting down", p.getName(), state.Status)
// prevent pending process from running
p.onProcessEnd(types.ProcessStateTerminating)
return nil
Expand Down

0 comments on commit f3ad8b4

Please sign in to comment.