launcher: wait for 'server started' to open default client
This commit is contained in:
parent
56a6641c46
commit
5ef59b16aa
1 changed files with 7 additions and 3 deletions
|
|
@ -171,9 +171,13 @@ if (settings.cli) {
|
|||
launcher.webContents.send('server-started')
|
||||
|
||||
if (!settings.read('no-gui')) {
|
||||
global.serverProcess.stdout.once('data', (data) => {
|
||||
global.clientWindows.push(openClient())
|
||||
})
|
||||
function cb(data) {
|
||||
if (data.indexOf('Server started') > -1) {
|
||||
global.clientWindows.push(openClient())
|
||||
global.serverProcess.stdout.off('data', cb)
|
||||
}
|
||||
}
|
||||
global.serverProcess.stdout.on('data', cb)
|
||||
}
|
||||
|
||||
global.serverProcess.stdout.on('data', (data) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue