diff --git a/execute.go b/execute.go index f98af80..e1933e5 100644 --- a/execute.go +++ b/execute.go @@ -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)