From baf655a2728f5566970fea0169f76bfe8948b7ab Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Fri, 1 May 2020 01:03:53 +0200 Subject: [PATCH] 2.3.4 * make sure to check if initialization was done when ending (Sentry IOBROKER-DISCOVERY-8) * fix megad discovery crash case --- README.md | 8 ++++++-- lib/adapters/megad.js | 4 ++-- main.js | 2 +- package-lock.json | 23 +++++++---------------- package.json | 2 +- 5 files changed, 17 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 6e97c03..f71ce2d 100644 --- a/README.md +++ b/README.md @@ -121,9 +121,13 @@ Just now it can detect via ping, UPnP (serial planned). ## Changelog +### 2.3.4 (2020-04-30) +* (Apollon77) make sure to check if initialization was done when ending (Sentry IOBROKER-DISCOVERY-8) +* (APollon77) fix megad discovery error + ### 2.3.3 (2020-04-23) -* correct access to wrong variable (Sentry IOBROKER-DISCOVERY-3) -* catch http errors better (Sentry IOBROKER-DISCOVERY-2) +* (Apollon77) correct access to wrong variable (Sentry IOBROKER-DISCOVERY-3) +* (Apollon77) catch http errors better (Sentry IOBROKER-DISCOVERY-2) ### 2.3.2 (2020-04-18) * (Apollon77) Fix potential crash in knx discovery diff --git a/lib/adapters/megad.js b/lib/adapters/megad.js index 4deb374..f60d420 100644 --- a/lib/adapters/megad.js +++ b/lib/adapters/megad.js @@ -19,9 +19,9 @@ function addMegaDDevice(ip, device, options, native, callback) { } }; options.newInstances.push(instance); - callback(null, true, ip); + typeof callback === 'function' && callback(null, true, ip); } else { - callback(null, false, ip); + typeof callback === 'function' && callback(null, false, ip); } } diff --git a/main.js b/main.js index 678d100..f8bd672 100644 --- a/main.js +++ b/main.js @@ -468,7 +468,7 @@ let g_browse = null; const specialEntryNames = 'name,data,LOCATION'.split(','); function haltAllMethods() { - Object.keys(methods).forEach(method => { + methods && Object.keys(methods).forEach(method => { // not final if (method && method.halt !== undefined) { method.halt = true; diff --git a/package-lock.json b/package-lock.json index 563bbe7..2949f3d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3512,9 +3512,9 @@ "optional": true }, "mocha": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-7.1.1.tgz", - "integrity": "sha512-3qQsu3ijNS3GkWcccT5Zw0hf/rWvu1fTN9sPvEd81hlwsr30GX2GcDSSoBxo24IR8FelmrAydGC6/1J5QQP4WA==", + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-7.1.2.tgz", + "integrity": "sha512-o96kdRKMKI3E8U0bjnfqW4QMk12MwZ4mhdBTf+B5a1q9+aq2HRnj+3ZdJu0B/ZhJeK78MgYuv6L8d/rA5AeBJA==", "dev": true, "requires": { "ansi-colors": "3.2.3", @@ -3530,7 +3530,7 @@ "js-yaml": "3.13.1", "log-symbols": "3.0.0", "minimatch": "3.0.4", - "mkdirp": "0.5.3", + "mkdirp": "0.5.5", "ms": "2.1.1", "node-environment-flags": "1.0.6", "object.assign": "4.1.0", @@ -3647,9 +3647,9 @@ } }, "fsevents": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.2.tgz", - "integrity": "sha512-R4wDiBwZ0KzpgOWetKDug1FZcYhqYnUYKtfZYt4mD5SBz76q0KR4Q9o7GIPamsVPGmW3EYPPJ0dOOjvx32ldZA==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz", + "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==", "dev": true, "optional": true }, @@ -3694,15 +3694,6 @@ "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true }, - "mkdirp": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.3.tgz", - "integrity": "sha512-P+2gwrFqx8lhew375MQHHeTlY8AuOJSrGf0R5ddkEndUkmwpgUob/vQuBD1V22/Cw1/lJr4x+EjllSezBThzBg==", - "dev": true, - "requires": { - "minimist": "^1.2.5" - } - }, "ms": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", diff --git a/package.json b/package.json index a2d5a8e..f0d9213 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "devDependencies": { "axios": "^0.19.2", "gulp": "^4.0.2", - "mocha": "^7.1.1", + "mocha": "^7.1.2", "chai": "^4.2.0", "eslint": "^6.8.0" },