Skip to content

Commit

Permalink
Term signal checked on async retry fixes #230 (#242)
Browse files Browse the repository at this point in the history
Signed-off-by: Sotirios Mantziaris <smantziaris@gmail.com>
  • Loading branch information
mantzas authored Nov 14, 2018
1 parent bce92f9 commit 6d532c9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions async/component.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ func (c *Component) Run(ctx context.Context) error {
if err == nil {
return nil
}
if ctx.Err() == context.Canceled {
break
}
c.consumerErrorsInc()
if c.retries > 0 {
log.Errorf("failed run, retry %d/%d with %v wait: %v", i, c.retries, c.retryWait, err)
Expand Down

0 comments on commit 6d532c9

Please sign in to comment.