einride/supervisor-go

Ignore context.Canceled?

Opened this issue · 0 comments

Raising it here for discussion, should we really try to restart a service if canceled by the context and returning context.Canceled? I just wrote some services that basically did:

select {
case <-ctx.Done():
  return ctx.Err()
}

which would then have supervisor-go try to restart them, while I think that could be ignored (e.g. if !errors.Is(err, context.Canceled))

WDYT?