Skip to content

Commit

Permalink
Remove me! - Added a time.Sleep to enroll command before restart
Browse files Browse the repository at this point in the history
  • Loading branch information
pchila committed Jun 20, 2024
1 parent d2146e3 commit 00be5e7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/pkg/agent/cmd/enroll_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,8 @@ func (c *enrollCmd) Execute(ctx context.Context, streams *cli.IOStreams) error {
}
}()

time.Sleep(5 * time.Second)

if c.agentProc == nil && !c.options.SkipDaemonRestart {
if err = c.daemonReloadWithBackoff(ctx); err != nil {
c.log.Errorf("Elastic Agent might not be running; unable to trigger restart: %v", err)
Expand Down

0 comments on commit 00be5e7

Please sign in to comment.