Fix task processor shutdown logic
@@ -290,7 +290,10 @@ func (t *taskProcessor) handleTaskError(
// this is a transient error
if err == ErrTaskRetry {
scope.IncCounter(metrics.TaskStandbyRetryCounter)
- <-notificationChan
+ select {
+ case <-notificationChan:
+ case <-t.shutdownCh:
+ }
return err
}
