fix for multi stdout
@@ -51,7 +51,11 @@ function createMainWindow() {
UrlSubject.subscribe(data => {
try {
- const data_object = JSON.parse(data)
+ const array = data.split(/\r?\n/)
+
+ array.forEach(row => {
+ try {
+ const data_object = JSON.parse(row)
const ip = data_object['ip']
const port = data_object['port']
const url = `http://${ip}:${port}`
@@ -59,6 +63,9 @@ function createMainWindow() {
} catch { }
})
+ } catch { }
+ })
+
window.on('closed', () => {
mainWindow = null
})
@@ -82,7 +89,7 @@ app.on('window-all-closed', () => {
})
app.on('will-quit', () => {
- pythonServer.kill('SIGINT')
+ pythonServer.kill()
})
app.on('activate', () => {
