rename to destoy()

This commit is contained in:
benedikt_home
2021-01-04 23:53:28 +05:00
parent 873c0ca6e9
commit 0346f5e886
3 changed files with 4 additions and 9 deletions

View File

@@ -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

View File

@@ -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);
};

View File

@@ -42,7 +42,7 @@ export default class SubscriberGroup {
}));
};
unSubscribe = () => {
destroy = () => {
this.subscribers.forEach((item) => {
item.cam = null;
item = null;