@basmilius/apple-common 0.0.92 → 0.0.94

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.
Files changed (2) hide show
  1. package/dist/index.js +5 -1
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -1197,7 +1197,11 @@ class Connection extends EventEmitter {
1197
1197
  }
1198
1198
  #onError(err) {
1199
1199
  reporter.error(`Connection error: ${err.message}`);
1200
- this.emit("error", err);
1200
+ if (this.listenerCount("error") > 0) {
1201
+ this.emit("error", err);
1202
+ } else {
1203
+ reporter.warn("No error handler registered. This is likely a bug.", this.constructor.name, "#onError");
1204
+ }
1201
1205
  if (this.#state === "connecting") {
1202
1206
  this.#scheduleRetry(err);
1203
1207
  } else {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@basmilius/apple-common",
3
3
  "description": "Common features shared across various apple protocol packages.",
4
- "version": "0.0.92",
4
+ "version": "0.0.94",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "author": {
@@ -38,7 +38,7 @@
38
38
  }
39
39
  },
40
40
  "dependencies": {
41
- "@basmilius/apple-encoding": "0.0.92",
41
+ "@basmilius/apple-encoding": "0.0.94",
42
42
  "@stablelib/chacha20poly1305": "^2.0.1",
43
43
  "fast-srp-hap": "^2.0.4",
44
44
  "node-dns-sd": "^1.0.1",