Skip to content

Commit

Permalink
Close proxy window when main window is closed.
Browse files Browse the repository at this point in the history
  • Loading branch information
niklasi committed Nov 29, 2016
1 parent e6aa36b commit 78bfa6f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ let win = null
let proxy = null

app.on('window-all-closed', () => {
console.log('All window closed...')
if (process.platform !== 'darwin') {
app.quit()
}
Expand Down Expand Up @@ -44,6 +45,7 @@ app.on('ready', () => {

win.on('closed', () => {
win = null
proxy.close()
console.log('Gui window closed...')
})

Expand All @@ -57,5 +59,6 @@ app.on('ready', () => {

proxy.on('closed', () => {
proxy = null
console.log('Proxy window closed...')
})
})

0 comments on commit 78bfa6f

Please sign in to comment.