mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
feat: killing port on start
This commit is contained in:
parent
4f725d08dc
commit
f1e47fc303
3 changed files with 21 additions and 1 deletions
|
@ -3,6 +3,7 @@ import updater from "electron-updater";
|
|||
import i18n from "i18next";
|
||||
import path from "node:path";
|
||||
import url from "node:url";
|
||||
import kill from "kill-port";
|
||||
import { electronApp, optimizer } from "@electron-toolkit/utils";
|
||||
import { logger, WindowManager } from "@main/services";
|
||||
import resources from "@locales";
|
||||
|
@ -58,7 +59,7 @@ app.whenReady().then(async () => {
|
|||
return net.fetch(url.pathToFileURL(decodeURI(filePath)).toString());
|
||||
});
|
||||
|
||||
await loadState();
|
||||
await kill(PythonRPC.RPC_PORT).finally(() => loadState());
|
||||
|
||||
const language = await db.get<string, string>(levelKeys.language, {
|
||||
valueEncoding: "utf-8",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue