wire-mesh-core 3.3.0 → 3.3.1
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.
|
@@ -67,8 +67,7 @@ function connectionFromByteStream(stream, options = { opened: false }) {
|
|
|
67
67
|
},
|
|
68
68
|
receive: () => frames,
|
|
69
69
|
close: async () => {
|
|
70
|
-
await writer.close();
|
|
71
|
-
await reader.cancel();
|
|
70
|
+
await Promise.allSettled([writer.close(), reader.cancel()]);
|
|
72
71
|
}
|
|
73
72
|
};
|
|
74
73
|
}
|
|
@@ -66,8 +66,7 @@ function connectionFromByteStream(stream, options = { opened: false }) {
|
|
|
66
66
|
},
|
|
67
67
|
receive: () => frames,
|
|
68
68
|
close: async () => {
|
|
69
|
-
await writer.close();
|
|
70
|
-
await reader.cancel();
|
|
69
|
+
await Promise.allSettled([writer.close(), reader.cancel()]);
|
|
71
70
|
}
|
|
72
71
|
};
|
|
73
72
|
}
|
|
@@ -19,6 +19,9 @@ function createRelayPairings() {
|
|
|
19
19
|
remove: (device) => {
|
|
20
20
|
established.delete(require_domain_device_id.deviceIdToHex(device));
|
|
21
21
|
},
|
|
22
|
+
clear: () => {
|
|
23
|
+
established.clear();
|
|
24
|
+
},
|
|
22
25
|
list: () => [...established.values()]
|
|
23
26
|
};
|
|
24
27
|
}
|
|
@@ -560,6 +563,7 @@ function createSessionCore(identity, clock, reconnect, dial, onPeerAdvert, addre
|
|
|
560
563
|
async function wireUpConnection(link, address, localDomains) {
|
|
561
564
|
connection = link;
|
|
562
565
|
relayChannels.reset("the connection changed before the channel was ready");
|
|
566
|
+
relayPairings.clear();
|
|
563
567
|
localHandshakeSent = localHandshake(localDomains);
|
|
564
568
|
handshake = { status: "pending" };
|
|
565
569
|
state = {
|
|
@@ -18,6 +18,9 @@ function createRelayPairings() {
|
|
|
18
18
|
remove: (device) => {
|
|
19
19
|
established.delete(deviceIdToHex(device));
|
|
20
20
|
},
|
|
21
|
+
clear: () => {
|
|
22
|
+
established.clear();
|
|
23
|
+
},
|
|
21
24
|
list: () => [...established.values()]
|
|
22
25
|
};
|
|
23
26
|
}
|
|
@@ -559,6 +562,7 @@ function createSessionCore(identity, clock, reconnect, dial, onPeerAdvert, addre
|
|
|
559
562
|
async function wireUpConnection(link, address, localDomains) {
|
|
560
563
|
connection = link;
|
|
561
564
|
relayChannels.reset("the connection changed before the channel was ready");
|
|
565
|
+
relayPairings.clear();
|
|
562
566
|
localHandshakeSent = localHandshake(localDomains);
|
|
563
567
|
handshake = { status: "pending" };
|
|
564
568
|
state = {
|