wrap cert db and make sync gracefull

This commit is contained in:
6543 2021-12-05 17:42:53 +01:00
parent 11fa729686
commit de439f9bec
No known key found for this signature in database
GPG key ID: C99B82E40B027BAE
7 changed files with 95 additions and 14 deletions

View file

@ -94,7 +94,7 @@ func Serve(ctx *cli.Context) error {
if err != nil {
return fmt.Errorf("could not create database: %v", err)
}
defer keyDatabase.Sync() //nolint:errcheck // database has no close ... sync behave like it
defer keyDatabase.Close() //nolint:errcheck // database has no close ... sync behave like it
listener = tls.NewListener(listener, certificates.TLSConfig(mainDomainSuffix,
giteaRoot, giteaAPIToken, dnsProvider,