add catch for failed eventBasedRecording

super-timeline
Moe 2023-07-22 12:11:58 -07:00
parent 70b17a36f4
commit d9d14065b5
1 changed files with 6 additions and 2 deletions

View File

@ -546,8 +546,12 @@ module.exports = (s,config,lang) => {
clearTimeout(activeMonitor.eventBasedRecording.timeout) clearTimeout(activeMonitor.eventBasedRecording.timeout)
activeMonitor.eventBasedRecording.timeout = setTimeout(function(){ activeMonitor.eventBasedRecording.timeout = setTimeout(function(){
activeMonitor.eventBasedRecording.allowEnd = true activeMonitor.eventBasedRecording.allowEnd = true
activeMonitor.eventBasedRecording.process.stdin.setEncoding('utf8') try{
activeMonitor.eventBasedRecording.process.stdin.write('q') activeMonitor.eventBasedRecording.process.stdin.setEncoding('utf8')
activeMonitor.eventBasedRecording.process.stdin.write('q')
}catch(err){
s.debugLog(err)
}
activeMonitor.eventBasedRecording.process.kill('SIGINT') activeMonitor.eventBasedRecording.process.kill('SIGINT')
delete(activeMonitor.eventBasedRecording.timeout) delete(activeMonitor.eventBasedRecording.timeout)
},detector_timeout * 1000 * 60) },detector_timeout * 1000 * 60)