Skip to content

Commit 04c5723

Browse files
committed
fix break
1 parent aa5d6a6 commit 04c5723

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

x-pack/filebeat/input/cel/input.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -514,6 +514,7 @@ func (i input) run(env v2.Context, src *source, cursor map[string]interface{}, p
514514

515515
start = time.Now()
516516
var hadPublicationError bool
517+
loop:
517518
for i, e := range events {
518519
event, ok := e.(map[string]interface{})
519520
if !ok {
@@ -552,13 +553,13 @@ func (i input) run(env v2.Context, src *source, cursor map[string]interface{}, p
552553
// Don't update status, since we are about to pass
553554
// through the Running state and then fall through
554555
// to the input exit with a change to Stopped.
555-
break
556+
break loop
556557
default:
557558
// This should never happen.
558559
log.Warnw("failed with unpublished events", "error", err, "unpublished", len(events)-i)
559560
health.UpdateStatus(status.Degraded, "error publishing events: "+err.Error())
560561
isDegraded = true
561-
break
562+
break loop
562563
}
563564
err = pub.Publish(beat.Event{
564565
Timestamp: time.Now(),

0 commit comments

Comments
 (0)