From 67e1f7d232b0158807baa21f3d29bff8315e4288 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 10 Nov 2021 21:34:50 -0500 Subject: [PATCH] Osquerybeat: Fix restart flags after previously bad config (#28827) (#28911) (cherry picked from commit 8d8e387d521d0fcde391434dc733c6310fa534a3) Co-authored-by: Aleksandr Maus --- x-pack/osquerybeat/beater/osquery_runner.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/x-pack/osquerybeat/beater/osquery_runner.go b/x-pack/osquerybeat/beater/osquery_runner.go index a1c890a559d..bd426f1eb13 100644 --- a/x-pack/osquerybeat/beater/osquery_runner.go +++ b/x-pack/osquerybeat/beater/osquery_runner.go @@ -68,11 +68,11 @@ func (r *osqueryRunner) Run(parentCtx context.Context, runfn osqueryRunFunc) err // Wait until osquery runner exists wg.Wait() - - // Set the flags to use - flags = newFlags } + // Set the flags to use + flags = newFlags + // Start osqueryd if not running if cn == nil { r.log.Info("Start osqueryd")