From bfb0956e744b6d723740e41e03fef58df57472ba Mon Sep 17 00:00:00 2001 From: Chris Berkhout Date: Fri, 28 Feb 2025 14:57:49 +0100 Subject: [PATCH] Make it sleep for real. --- x-pack/filebeat/input/o365audit/poll/poll.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/filebeat/input/o365audit/poll/poll.go b/x-pack/filebeat/input/o365audit/poll/poll.go index 00778cb71f43..09f4727a2037 100644 --- a/x-pack/filebeat/input/o365audit/poll/poll.go +++ b/x-pack/filebeat/input/o365audit/poll/poll.go @@ -86,7 +86,7 @@ func (r *Poller) fetchWithDelay(item Transaction, minDelay time.Duration) error // Delay before getting the token, so it doesn't become stale. delay := max(item.Delay(), minDelay) r.log.Debugf(" -- wait %s for %s", delay, item) - time.After(delay) + time.Sleep(delay) // The order here is important. item's decorators must come first as those // set the URL, which is required by other decorators (WithQueryParameters).