From bf9ba6ee59654c505e4eb56b6eec76af08bbc992 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 5 Nov 2021 09:29:31 -0400 Subject: [PATCH] Osquerybeat: Fix restart flags after previously bad config (#28827) (#28829) (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")