Close connections when window closed

Fixes #8
This commit is contained in:
Thomas Nordquist
2019-01-14 11:23:46 +01:00
parent 611fde13e2
commit ad78ca03d8
2 changed files with 10 additions and 0 deletions

View File

@@ -30,6 +30,11 @@ function createWindow () {
// Open the DevTools.
// mainWindow.webContents.openDevTools()
// Emitted when the window is closed.
mainWindow.on('close', function () {
connectionManager.closeAllConnections()
})
// Emitted when the window is closed.
mainWindow.on('closed', function () {
// Dereference the window object, usually you would store windows