mapperLocal: actually leave loop on read from done channel

staticcheck points out that the break is otherwise an ineffective
break because it just ends the current case clause of the switch
it's in, which is true.
This commit is contained in:
Seebs 2021-08-11 15:22:54 -05:00
parent 1745a93aee
commit ab9b70d7e8

View file

@ -5939,6 +5939,7 @@ func (e *executor) mapperLocal(ctx context.Context, shards []uint64, mapFn mapFu
ch := make(chan mapResponse, len(shards))
expected := 0
shardLoop:
for _, shard := range shards {
j := job{
shard: shard,
@ -5949,7 +5950,7 @@ func (e *executor) mapperLocal(ctx context.Context, shards []uint64, mapFn mapFu
}
select {
case <-done:
break
break shardLoop
case e.work <- j:
expected++
}