Skip to content
This repository has been archived by the owner on Mar 29, 2024. It is now read-only.

Commit

Permalink
Merge pull request #501 from safing/feature/use-ping-for-core-detection
Browse files Browse the repository at this point in the history
Use the ping API to detect if portmaster-core is running
  • Loading branch information
dhaavi authored Dec 22, 2023
2 parents 2242b1f + 0bce0cd commit bbcdba4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app-electron/src/loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit bbcdba4

Please sign in to comment.