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