Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions x-pack/elastic-agent/CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
- Properly stops subprocess on shutdown {pull}19567[19567]
- Forward revision number of the configuration to the endpoint. {pull}19759[19759]
- Remove support for logs type and use logfile {pull}19761[19761]
- Avoid comparing uncomparable types on enroll {issue}19976[19976]

==== New features

Expand Down
2 changes: 1 addition & 1 deletion x-pack/elastic-agent/pkg/agent/cmd/enroll.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ func enroll(streams *cli.IOStreams, cmd *cobra.Command, flags *globalFlags, args

backExp := backoff.NewExpBackoff(signal, 60*time.Second, 10*time.Minute)

for err == fleetapi.ErrTooManyRequests {
for errors.Is(err, fleetapi.ErrTooManyRequests) {
fmt.Fprintln(streams.Out, "Too many requests on the remote server, will retry in a moment.")
backExp.Wait()
fmt.Fprintln(streams.Out, "Retrying to enroll...")
Expand Down