From 0346f5e8865728d554a593a19ea05335311eb4c4 Mon Sep 17 00:00:00 2001 From: benedikt_home Date: Mon, 4 Jan 2021 23:53:28 +0500 Subject: [PATCH] rename to destoy() --- config.sample.yml | 9 ++------- src/Manager.js | 2 +- src/onvif/SubscriberGroup.js | 2 +- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/config.sample.yml b/config.sample.yml index 258343d..10dfbbf 100644 --- a/config.sample.yml +++ b/config.sample.yml @@ -2,13 +2,8 @@ mqtt: host: 127.0.0.1 port: 1883 onvif: - - name: device_name_R - hostname: 127.0.0.1 - port: 80 - username: username11 - password: password - - name: device_name_M + - name: device_name hostname: 127.0.0.1 port: 80 username: username - password: password1 + password: password diff --git a/src/Manager.js b/src/Manager.js index c36517f..30790fa 100644 --- a/src/Manager.js +++ b/src/Manager.js @@ -35,7 +35,7 @@ export default class Manager { }; initializeOnvifDevicesFunctions = () => { - this.subscriber.unSubscribe(); + this.subscriber.destroy(); this.initializeOnvifDevices(this.config.get('onvif')); this.subscriber.withCallback(CALLBACK_TYPES.motion, this.onMotionDetected); }; diff --git a/src/onvif/SubscriberGroup.js b/src/onvif/SubscriberGroup.js index 00f965c..e523d61 100644 --- a/src/onvif/SubscriberGroup.js +++ b/src/onvif/SubscriberGroup.js @@ -42,7 +42,7 @@ export default class SubscriberGroup { })); }; - unSubscribe = () => { + destroy = () => { this.subscribers.forEach((item) => { item.cam = null; item = null;