Require a lock on the restart process to avoid double restarts causing unexpected behavior

This commit is contained in:
Dane Everitt
2020-07-18 16:46:41 -07:00
parent 6de18f09e5
commit a00288aa64
4 changed files with 92 additions and 11 deletions

View File

@@ -411,11 +411,7 @@ func (s *Server) HandlePowerAction(action PowerAction) error {
case "start":
return s.Environment.Start()
case "restart":
if err := s.Environment.WaitForStop(60, false); err != nil {
return err
}
return s.Environment.Start()
return s.Environment.Restart()
case "stop":
return s.Environment.Stop()
case "kill":