mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-10-29 17:52:32 +00:00
agent: Fix bug with early exits during restarts (#20950)
This commit is contained in:
committed by
GitHub
parent
f8d1d98995
commit
bc9a39a2f1
@@ -320,8 +320,11 @@ func (s *Server) restartChildProcess(newEnvVars []string) error {
|
||||
// race condition with ExitCh not being initialized.
|
||||
go func() {
|
||||
select {
|
||||
case exitCode := <-proc.ExitCh():
|
||||
s.childProcessExitCh <- exitCode
|
||||
case exitCode, ok := <-proc.ExitCh():
|
||||
// ignore ExitCh channel closures caused by our restarts
|
||||
if ok {
|
||||
s.childProcessExitCh <- exitCode
|
||||
}
|
||||
}
|
||||
}()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user