From 0bce0cd244acf53e267ca927227372ba6885b73c Mon Sep 17 00:00:00 2001 From: Daniel Date: Mon, 18 Dec 2023 11:19:05 +0100 Subject: [PATCH] Use the ping API to detect if portmaster-core is running --- app-electron/src/loader.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app-electron/src/loader.ts b/app-electron/src/loader.ts index a754d6b7..cb931f6b 100644 --- a/app-electron/src/loader.ts +++ b/app-electron/src/loader.ts @@ -27,7 +27,7 @@ export class WebUILoader { constructor( private win: BrowserWindow, private url: string = 'http://127.0.0.1:817/', - private pollUrl: string = 'http://127.0.0.1:817/', + private pollUrl: string = 'http://127.0.0.1:817/api/v1/ping', ) { // Detect the system manager we need to interface // with when starting/stopping the portmaster @@ -83,8 +83,8 @@ export class WebUILoader { // we try to load the index.html in the background // so we don't mess around with the current window // content. - const response = await axios.get(this.pollUrl); - await this.win.loadURL(this.url) + await axios.get(this.pollUrl); + await this.win.loadURL(this.url); this.loaded = true; return } catch (err) {