main: better process exit
This commit is contained in:
parent
7ae023663e
commit
27b56ccf88
1 changed files with 3 additions and 5 deletions
|
|
@ -20,7 +20,7 @@ var start = function(readyApp) {
|
|||
serverStarted = true
|
||||
process.on('exit',()=>{
|
||||
if (osc.midi) osc.midi.stop()
|
||||
})
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -31,16 +31,14 @@ var start = function(readyApp) {
|
|||
if (app.isReady()) {
|
||||
var win = require('./electron-window')({address:address, shortcuts:true})
|
||||
app.on('before-quit',()=>{
|
||||
win.destroy()
|
||||
if (osc.midi) osc.midi.stop()
|
||||
process.exit()
|
||||
})
|
||||
return win
|
||||
} else {
|
||||
app.on('ready',function(){
|
||||
var win = require('./electron-window')({address:address, shortcuts:true})
|
||||
app.on('before-quit',()=>{
|
||||
win.destroy()
|
||||
if (osc.midi) osc.midi.stop()
|
||||
process.exit()
|
||||
})
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue