@basmilius/apple-common 0.3.1 → 0.3.3
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/dist/index.js +6 -2
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -990,7 +990,7 @@ class Connection extends EventEmitter {
|
|
|
990
990
|
return this.#attemptConnect();
|
|
991
991
|
}
|
|
992
992
|
async destroy() {
|
|
993
|
-
this.#socket
|
|
993
|
+
this.#socket?.destroy();
|
|
994
994
|
}
|
|
995
995
|
async disconnect() {
|
|
996
996
|
if (this.#retryTimeout) {
|
|
@@ -1025,7 +1025,11 @@ class Connection extends EventEmitter {
|
|
|
1025
1025
|
return;
|
|
1026
1026
|
}
|
|
1027
1027
|
return new Promise((resolve, reject) => {
|
|
1028
|
-
|
|
1028
|
+
try {
|
|
1029
|
+
this.#socket.write(data, (err) => err ? reject(err) : resolve());
|
|
1030
|
+
} catch (err) {
|
|
1031
|
+
reject(err);
|
|
1032
|
+
}
|
|
1029
1033
|
});
|
|
1030
1034
|
}
|
|
1031
1035
|
async#attemptConnect() {
|
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.
|
|
4
|
+
"version": "0.3.3",
|
|
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.
|
|
41
|
+
"@basmilius/apple-encoding": "0.3.3",
|
|
42
42
|
"@stablelib/chacha20poly1305": "^2.0.1",
|
|
43
43
|
"fast-srp-hap": "^2.0.4",
|
|
44
44
|
"node-dns-sd": "^1.0.1",
|