Quit cleanly when stream window closed

This commit is contained in:
Max Goodhart
2020-07-27 11:46:07 -07:00
parent 19a29e859f
commit bb4d62050c
2 changed files with 5 additions and 0 deletions

View File

@@ -47,6 +47,7 @@ export default class StreamWindow extends EventEmitter {
})
win.removeMenu()
win.loadURL('about:blank')
win.on('close', () => this.emit('close'))
// Work around https://github.com/electron/electron/issues/14308
// via https://github.com/lutzroeder/netron/commit/910ce67395130690ad76382c094999a4f5b51e92

View File

@@ -356,6 +356,10 @@ async function main() {
updateState({ views: viewStates })
})
streamWindow.on('close', () => {
process.exit(0)
})
const dataSources = [
...argv.data['json-url'].map((url) =>
markDataSource(pollDataURL(url, argv.data.interval), 'json-url'),