webrtc server creation waiting added, webrtc and app order changed, titles.json removed
This commit is contained in:
@@ -5,6 +5,10 @@ const webrtc_server_path = config.webrtc_server_path
|
||||
const app_args_static = config.app_args.static
|
||||
const app_port_arg = config.app_args.runtime.port
|
||||
const fs = require('fs')
|
||||
const tcp_port_used = require('tcp-port-used')
|
||||
|
||||
const webrtc_timeout = 5000
|
||||
const webrtc_retry_time = 100
|
||||
|
||||
const is_proc_running = (pid) => {
|
||||
return is_running(pid)
|
||||
@@ -37,6 +41,7 @@ const run_webrtc = async (webrtc_port, app_port) => {
|
||||
webrtc_proc = fork(webrtc_server_path, [webrtc_proc_arg], {
|
||||
detached: true
|
||||
})
|
||||
await tcp_port_used.waitUntilUsed(webrtc_port, webrtc_retry_time, webrtc_timeout)
|
||||
} catch (err) {
|
||||
return null
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user