Skip to content

Commit

Permalink
Agent: Fix panic on receiving osquery action due to bad merge to 7.x (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
aleksmaus committed Apr 30, 2021
1 parent 5507402 commit 839aa77
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion x-pack/elastic-agent/pkg/agent/application/managed_mode.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ func newManaged(

actionDispatcher.MustRegister(
&fleetapi.ActionApp{},
handlers.NewAppAction(log),
handlers.NewAppAction(log, managedApplication.srv),
)

actionDispatcher.MustRegister(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@ type AppAction struct {
}

// NewAppAction creates a new AppAction handler.
func NewAppAction(log *logger.Logger) *AppAction {
func NewAppAction(log *logger.Logger, srv *server.Server) *AppAction {
return &AppAction{
log: log,
srv: srv,
}
}

Expand Down

0 comments on commit 839aa77

Please sign in to comment.