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

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))