From b3a27f43e355539c713aaf44bc1ed542e6186348 Mon Sep 17 00:00:00 2001 From: Moe Date: Wed, 31 Aug 2022 12:20:24 -0700 Subject: [PATCH] minor adjustment to onvif events init --- libs/events/onvif.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/events/onvif.js b/libs/events/onvif.js index 6d44f3ff..6f177fe8 100644 --- a/libs/events/onvif.js +++ b/libs/events/onvif.js @@ -72,11 +72,11 @@ module.exports = function(s,config,lang){ } try{ onvifEventControllers[onvifIdKey].close() - delete(onvifEventControllers[onvifIdKey]) s.debugLog('ONVIF Event Module Warning : This could cause a memory leak?') }catch(err){ - console.log('ONVIF Event Module Error', err); + s.debugLog('ONVIF Event Module Error', err); } + delete(onvifEventControllers[onvifIdKey]) if(monitorMode !== 'stop'){ startMotion(onvifId,monitorConfig).then((detector) => { onvifEventControllers[onvifIdKey] = detector;