From f3ad8b4fa4329663b4b653bb9e668a38ada58f1b Mon Sep 17 00:00:00 2001 From: Berger Eugene Date: Sat, 16 Sep 2023 12:52:12 +0300 Subject: [PATCH] Fix state race --- src/app/process.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/process.go b/src/app/process.go index 49fa36d..41e0c51 100644 --- a/src/app/process.go +++ b/src/app/process.go @@ -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