From c011477531149bdbf0949cf766f0d5916b4c0783 Mon Sep 17 00:00:00 2001 From: Moe Date: Thu, 26 Oct 2023 10:26:33 -0700 Subject: [PATCH] childNode adjustments --- libs/childNode.js | 2 +- libs/monitor/utils.js | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/libs/childNode.js b/libs/childNode.js index 6d1d9879..97c9c09e 100644 --- a/libs/childNode.js +++ b/libs/childNode.js @@ -67,7 +67,7 @@ module.exports = function(s,config,lang,app,io){ }) }else{ s.debugLog('Child Node Force Disconnected!',new Date(),ipAddress) - client.destroy() + client.disconnect() } } client.on('message',onAuthenticate) diff --git a/libs/monitor/utils.js b/libs/monitor/utils.js index 00cd7ddf..8c555e6e 100644 --- a/libs/monitor/utils.js +++ b/libs/monitor/utils.js @@ -8,6 +8,7 @@ const spawn = require('child_process').spawn; const connectionTester = require('connection-tester') const SoundDetection = require('shinobi-sound-detection') const streamViewerCountTimeouts = {} +const { createQueueAwaited } = require('../common.js') module.exports = (s,config,lang) => { const { applyPartialToConfiguration, @@ -1431,6 +1432,9 @@ module.exports = (s,config,lang) => { const typeIsLocal = e.type === 'local' const monitorConfig = theGroup.rawMonitorConfigurations[monitorId] const doPingTest = e.type !== 'socket' && e.type !== 'dashcam' && e.protocol !== 'udp' && e.type !== 'local' && e.details.skip_ping !== '1'; + if(!theGroup.startMonitorInQueue){ + theGroup.startMonitorInQueue = createQueueAwaited(0.5, 1) + } const startMonitorInQueue = theGroup.startMonitorInQueue if(!activeMonitor.isStarted)return; // e = monitor object