Replace os.exit with wails quit

Exit would prevent defers from running which meant db would be left
dangling
This commit is contained in:
2024-08-15 02:46:04 +02:00
parent 4abddac94f
commit 235a90b0a7

5
app.go
View File

@@ -2,7 +2,8 @@ package main
import (
"context"
"os"
"github.com/wailsapp/wails/v2/pkg/runtime"
)
// App struct
@@ -139,5 +140,5 @@ func (a *App) SetSetting(key string, value int64) WailsGenericAck {
//region other
func (a *App) Close() {
os.Exit(0)
runtime.Quit(a.ctx)
}