From 8d8e387d521d0fcde391434dc733c6310fa534a3 Mon Sep 17 00:00:00 2001 From: Aleksandr Maus Date: Thu, 4 Nov 2021 20:25:51 -0400 Subject: [PATCH] Osquerybeat: Fix restart flags after previously bad config (#28827) --- 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")