fix(display): closing app wont stop server

This commit is contained in:
2025-11-07 19:51:18 +01:00
parent aa7d1e7ee6
commit b94c80bfc6
2 changed files with 16 additions and 5 deletions
+3 -1
View File
@@ -24,8 +24,10 @@ func main() {
return
}
port := "1323"
go web.StartWebServer(VERSION, port)
// the order is important, the open browser command exitsts as soon as the winodw is closed
// and since its the last action in the main go func all other goroutines (e.g. the webserver) are killed
go web.StartWebServer(VERSION, port)
err = shared.OpenBrowserWindow("http://localhost:"+port, true, true)
if err != nil {
slog.Error("Failed to open browser window", "error", err)