Stopping all local servers when leaving application

This commit is contained in:
ziajka
2019-02-19 15:03:33 +01:00
parent 6759568933
commit 16185d2461
6 changed files with 95 additions and 36 deletions

View File

@ -59,13 +59,14 @@ function createWindow () {
}
// Emitted when the window is closed.
mainWindow.on('closed', function () {
mainWindow.on('closed',async function () {
// Dereference the window object, usually you would store windows
// in an array if your app supports multi windows, this is the time
// when you should delete the corresponding element.
mainWindow = null
});
// forward event to renderer
electron.ipcMain.on('local-server-status-events', (event) => {
mainWindow.webContents.send('local-server-status-events', event);