Skip to content

Commit

Permalink
Skip processing on closed result channel, fix panic (#215)
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnStarich authored Aug 21, 2024
1 parent 6496791 commit 634cff6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion execute.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,10 @@ func (executor *ParallelExecutor) Execute(ctx *ExecutionContext) (map[string]int
for {
select {
// we have a new result
case payload := <-resultCh:
case payload, ok := <-resultCh:
if !ok {
return
}
ctx.logger.Debug("Inserting result into ", payload.InsertionPoint)
ctx.logger.Debug("Result: ", payload.Result)

Expand Down

0 comments on commit 634cff6

Please sign in to comment.