Review of 083: an upgrade handled during shutdown is left for the broker; an enrolment cut short by shutdown is told to try again; a refused redelivery says what it probably is
This commit is contained in:
@@ -45,7 +45,8 @@ func (e Enrolment) Enrol(ctx context.Context, request EnrolRequest) (reply Enrol
|
||||
// A store that could not be asked right now, or a token another presenter holds for the
|
||||
// moment, is "not now": the node asks again with the same request (novox/hq issue 083).
|
||||
defer func() {
|
||||
if inventory.Unreachable(err) || errors.Is(err, inventory.ErrTokenInUse) {
|
||||
if inventory.Unreachable(err) || errors.Is(err, inventory.ErrTokenInUse) ||
|
||||
errors.Is(err, context.Canceled) {
|
||||
err = fmt.Errorf("%w: %w", ErrTryAgain, err)
|
||||
}
|
||||
}()
|
||||
|
||||
Reference in New Issue
Block a user