mirror of
https://gitlab.com/futo-org/fcast.git
synced 2025-06-24 21:25:23 +00:00
Electron: Restart mdns service after network change
This commit is contained in:
parent
78143ed172
commit
c1e72173e0
1 changed files with 2 additions and 0 deletions
|
@ -387,6 +387,8 @@ export class Main {
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
ipcMain.on('network-changed', (event: IpcMainEvent, value: any) => {
|
ipcMain.on('network-changed', (event: IpcMainEvent, value: any) => {
|
||||||
Main.cache.interfaces = value;
|
Main.cache.interfaces = value;
|
||||||
|
Main.discoveryService.stop();
|
||||||
|
Main.discoveryService.start();
|
||||||
Main.mainWindow?.webContents?.send("device-info", { name: os.hostname(), interfaces: value });
|
Main.mainWindow?.webContents?.send("device-info", { name: os.hostname(), interfaces: value });
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue