Skip to content

Commit 9cc258f

Browse files
committed
discovery: Fix cancel path in EKS audit log fetcher
Change a `break` to a `continue` when a context is done so we do not continue to send an empty payload on cleanup.
1 parent d0bcdc9 commit 9cc258f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/srv/discovery/eks_audit_log_fetcher.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,9 @@ func (f *eksAuditLogFetcher) Run(ctx context.Context) error {
6969
if len(events) == 0 {
7070
select {
7171
case <-ctx.Done():
72-
break
7372
case <-time.After(logPollInterval):
74-
continue
7573
}
74+
continue
7675
}
7776

7877
if err := f.sendTAGKubeAuditLogEvents(ctx, events, cursor); err != nil {

0 commit comments

Comments
 (0)