Commit 71b03052 authored by Hamdi Allam's avatar Hamdi Allam

nil in err ch is okay. Otherwise tests catch an error

parent 6fe9bbe8
......@@ -2,7 +2,6 @@ package indexer
import (
"context"
"errors"
"fmt"
"sync"
......@@ -91,12 +90,12 @@ func (i *Indexer) Run(ctx context.Context) error {
err := start(processorCtx)
if err != nil {
i.log.Error("halting indexer on error", "err", err)
cancel()
errCh <- err
} else {
errCh <- errors.New("processor stopped")
}
// Send a value down regardless if we've received an error or halted
// via cancellation where err == nil
errCh <- err
}
// Kick off the processors
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment