Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ineffective break statement in dynamic output #2285

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion internal/impl/io/output_dynamic_fan_out.go
Expand Up @@ -257,6 +257,7 @@ func (d *dynamicFanOutOutputBroker) loop() {
_ = atomic.AddInt64(&ackPending, 1)
pendingResponses := int64(len(d.outputs))

outputsLoop:
for _, output := range d.outputs {
select {
case output.tsChan <- message.NewTransactionFunc(ts.Payload.ShallowCopy(), func(ctx context.Context, err error) error {
Expand All @@ -273,7 +274,7 @@ func (d *dynamicFanOutOutputBroker) loop() {
return nil
}):
case <-d.shutSig.CloseAtLeisureChan():
break // This signal will be caught again in the next loop
break outputsLoop // This signal will be caught again in the next loop
}
}
d.outputsMut.RUnlock()
Expand Down