@basmilius/apple-common 0.3.0 → 0.3.2

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 +1 -1
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -1020,7 +1020,7 @@ class Connection extends EventEmitter {
1020
1020
  return this;
1021
1021
  }
1022
1022
  async write(data) {
1023
- if (!this.#socket || this.state !== "connected") {
1023
+ if (!this.#socket || this.state !== "connected" || !this.#socket.writable) {
1024
1024
  this.emit("error", new Error("Cannot write to a disconnected connection."));
1025
1025
  return;
1026
1026
  }
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.3.0",
4
+ "version": "0.3.2",
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.3.0",
41
+ "@basmilius/apple-encoding": "0.3.2",
42
42
  "@stablelib/chacha20poly1305": "^2.0.1",
43
43
  "fast-srp-hap": "^2.0.4",
44
44
  "node-dns-sd": "^1.0.1",