Also close database gracefully

This commit is contained in:
Jan Zípek 2024-04-01 08:38:33 +02:00
parent 699e8aa959
commit 160764380b
Signed by: kamen
GPG Key ID: A17882625B33AC31
1 changed files with 4 additions and 0 deletions

View File

@ -114,5 +114,9 @@ func main() {
log.Fatalf("Server shutdown failed: %v", err)
}
if err := server.DB.Close(); err != nil {
log.Fatalf("Database close failed: %v", err)
}
log.Println("Server stopped")
}