From c02fe779983313ff0b9a3d08501553b2fa45f47c Mon Sep 17 00:00:00 2001 From: Mariano Cano Date: Thu, 7 May 2020 18:59:30 -0700 Subject: [PATCH] Close the key manager before shutting down. --- authority/authority.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/authority/authority.go b/authority/authority.go index 828adf2f..cdf37953 100644 --- a/authority/authority.go +++ b/authority/authority.go @@ -6,6 +6,7 @@ import ( "crypto/sha256" "crypto/x509" "encoding/hex" + "log" "sync" "time" @@ -327,5 +328,8 @@ func (a *Authority) GetDatabase() db.AuthDB { // Shutdown safely shuts down any clients, databases, etc. held by the Authority. func (a *Authority) Shutdown() error { + if err := a.keyManager.Close(); err != nil { + log.Printf("error closing the key manager: %v", err) + } return a.db.Shutdown() }