process kill updated to invisible, webrtc_timeout increased, port allocation changed for high concurrency, port information added to database, app process kill added if webrtc not started
This commit is contained in:
@@ -7,7 +7,7 @@ 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_timeout = 60000
|
||||
const webrtc_retry_time = 100
|
||||
|
||||
const is_proc_running = (pid) => {
|
||||
@@ -43,6 +43,7 @@ const run_webrtc = async (webrtc_port, app_port) => {
|
||||
})
|
||||
await tcp_port_used.waitUntilUsed(webrtc_port, webrtc_retry_time, webrtc_timeout)
|
||||
} catch (err) {
|
||||
console.error(err)
|
||||
return null
|
||||
}
|
||||
|
||||
@@ -80,7 +81,12 @@ const kill_proc = (pid) => {
|
||||
return
|
||||
}
|
||||
if (process.platform === 'win32') {
|
||||
spawn('taskkill', ['/pid', pid, '/f', '/t'])
|
||||
spawn('taskkill', ['/pid', pid, '/f', '/t'], {
|
||||
shell: false,
|
||||
detached: true,
|
||||
stdio: 'ignore',
|
||||
windowsHide: true
|
||||
})
|
||||
}
|
||||
else {
|
||||
process.kill(pid)
|
||||
|
||||
Reference in New Issue
Block a user