diff --git a/vault/expiration.go b/vault/expiration.go index abe8ee67a488..574c58e5b263 100644 --- a/vault/expiration.go +++ b/vault/expiration.go @@ -102,15 +102,18 @@ func expireLeaseStrategyRevoke(ctx context.Context, m *ExpirationManager, le *le case <-ctx.Done(): case <-m.quitCh: cancel() + case <-revokeCtx.Done(): } }() select { case <-m.quitCh: m.logger.Error("shutting down, not attempting further revocation of lease", "lease_id", le.LeaseID) + cancel() return case <-m.quitContext.Done(): m.logger.Error("core context canceled, not attempting further revocation of lease", "lease_id", le.LeaseID) + cancel() return default: }