mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-02 03:27:54 +00:00
backport of commit bc9a39a2f1 (#20954)
Co-authored-by: Anton Averchenkov <84287187+averche@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
2d077fc6f9
commit
08cbaab36e
@@ -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