midi: make sure the process terminates when closing the app main window

This commit is contained in:
jean-emmanuel 2017-02-24 01:27:38 +01:00
parent 8fbcdce320
commit eaa0ef0651
3 changed files with 9 additions and 11 deletions

View file

@ -29,6 +29,7 @@ var start = function(readyApp) {
var win = require('./electron-window')({address:address, shortcuts:true})
app.on('before-quit',()=>{
win.destroy()
if (osc.midi) osc.midi.stop()
})
return win
} else {
@ -36,6 +37,7 @@ var start = function(readyApp) {
var win = require('./electron-window')({address:address, shortcuts:true})
app.on('before-quit',()=>{
win.destroy()
if (osc.midi) osc.midi.stop()
})
})
}