Skip to content

Commit

Permalink
Add cleanup of validation engine
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>
  • Loading branch information
cipherboy committed Apr 18, 2023
1 parent 678feb7 commit 7ed53ea
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions builtin/logical/pki/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ func Backend(conf *logical.BackendConfig) *backend {
InitializeFunc: b.initialize,
Invalidate: b.invalidate,
PeriodicFunc: b.periodicFunc,
Clean: b.cleanup,
}

// Add ACME paths to backend
Expand Down Expand Up @@ -435,6 +436,10 @@ func (b *backend) initialize(ctx context.Context, _ *logical.InitializationReque
return nil
}

func (b *backend) cleanup(_ context.Context) {
b.acmeState.validator.Closing <- struct{}{}
}

func (b *backend) initializePKIIssuersStorage(ctx context.Context) error {
// Grab the lock prior to the updating of the storage lock preventing us flipping
// the storage flag midway through the request stream of other requests.
Expand Down

0 comments on commit 7ed53ea

Please sign in to comment.