fix childNode ghost processes from disconnect

pushover
Moe 2019-09-24 11:54:01 -07:00
parent 1fe85465b4
commit e362639a9a
1 changed files with 8 additions and 0 deletions

View File

@ -254,6 +254,14 @@ module.exports = function(s,config,lang,app,io){
}
})
childIO.on('disconnect',function(d){
var groupKeys = Object.keys(s.group)
groupKeys.forEach(function(groupKey){
var activeMonitorKeys = Object.keys(s.group[groupKey].activeMonitors)
activeMonitorKeys.forEach(function(monitorKey){
var activeMonitor = s.group[groupKey].activeMonitors[monitorKey]
s.camera('stop',activeMonitor)
})
})
s.connected = false;
})
}