wire-mesh-core 3.5.0 → 3.5.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.
@@ -638,7 +638,10 @@ function createSessionCore(identity, clock, reconnect, dial, onPeerAdvert, addre
638
638
  async connect(address, localDomains) {
639
639
  if (connection !== null) throw new Error("a session connects once; create a new one to reconnect");
640
640
  attempt = 0;
641
- await doConnect(address, localDomains);
641
+ await doConnect(address, localDomains).catch((error) => {
642
+ handleDisconnect(error instanceof Error ? error.message : String(error), address, localDomains);
643
+ throw error;
644
+ });
642
645
  },
643
646
  async sendPing() {
644
647
  const link = requireConnectedLink();
@@ -637,7 +637,10 @@ function createSessionCore(identity, clock, reconnect, dial, onPeerAdvert, addre
637
637
  async connect(address, localDomains) {
638
638
  if (connection !== null) throw new Error("a session connects once; create a new one to reconnect");
639
639
  attempt = 0;
640
- await doConnect(address, localDomains);
640
+ await doConnect(address, localDomains).catch((error) => {
641
+ handleDisconnect(error instanceof Error ? error.message : String(error), address, localDomains);
642
+ throw error;
643
+ });
641
644
  },
642
645
  async sendPing() {
643
646
  const link = requireConnectedLink();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wire-mesh-core",
3
- "version": "3.5.0",
3
+ "version": "3.5.1",
4
4
  "dependencies": {
5
5
  "cbor2": "2.3.0",
6
6
  "cddl.js": "1.0.1",