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:
@@ -3,6 +3,7 @@ const database = require('../database/database')
|
||||
const {is_proc_running, kill_proc} = require('./run_process')
|
||||
const coordinator = require('./coordinator')
|
||||
const wait_list = require('./wait_list')
|
||||
const {free_app_port, free_webrtc_port} = require('./port_alloc')
|
||||
|
||||
const observer_timeout = 100
|
||||
var pending_list = new wait_list([])
|
||||
@@ -34,12 +35,15 @@ const check_sessions = async (sessions) => {
|
||||
// kill process if running
|
||||
kill_proc(session.webrtc_pid)
|
||||
kill_proc(session.app_pid)
|
||||
// free ports allocated for processes
|
||||
free_webrtc_port(session.webrtc_port)
|
||||
free_app_port(session.app_port)
|
||||
|
||||
var close_session_result = await coordinator.close_session(session.session_id)
|
||||
if (close_session_result) {
|
||||
await database.remove_running_session(session.session_id)
|
||||
} else {
|
||||
console.log('can not connect to coordinator')
|
||||
console.error('can not connect to coordinator')
|
||||
}
|
||||
pending_list.remove(session.session_id)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user