node-switchbot 1.8.1-beta.5 → 1.8.1-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/switchbot.js +4 -2
- package/package.json +1 -1
package/lib/switchbot.js
CHANGED
|
@@ -207,7 +207,8 @@ class Switchbot {
|
|
|
207
207
|
return;
|
|
208
208
|
default: // 'resetting', 'unknown'
|
|
209
209
|
this.noble.once("stateChange", (state) => {
|
|
210
|
-
|
|
210
|
+
require("events").EventEmitter.prototype.setMaxListeners(0);
|
|
211
|
+
require("events").setMaxListeners(0);
|
|
211
212
|
if (state === "poweredOn") {
|
|
212
213
|
resolve();
|
|
213
214
|
} else {
|
|
@@ -376,7 +377,8 @@ class Switchbot {
|
|
|
376
377
|
},
|
|
377
378
|
false
|
|
378
379
|
);
|
|
379
|
-
|
|
380
|
+
require("events").EventEmitter.prototype.setMaxListeners(0);
|
|
381
|
+
require("events").setMaxListeners(0);
|
|
380
382
|
if (!valid) {
|
|
381
383
|
reject(new Error(parameterChecker.error.message));
|
|
382
384
|
return;
|
package/package.json
CHANGED