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:
2026-09-22 14:39:15 +02:00
parent 32b8af6a9b
commit 4f3b4e6014
3 changed files with 28 additions and 1 deletions
+2 -1
View File
@@ -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)
}
}()