db Sync on exit

This commit is contained in:
6543 2021-12-03 04:18:53 +01:00
parent 5ca5020cfa
commit 0bc38b668f
No known key found for this signature in database
GPG Key ID: C99B82E40B027BAE
1 changed files with 1 additions and 0 deletions

View File

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