aboutsummaryrefslogtreecommitdiffstats
path: root/packages/meshbay-hub/src
diff options
context:
space:
mode:
Diffstat (limited to 'packages/meshbay-hub/src')
-rw-r--r--packages/meshbay-hub/src/meshbay_hub/static/transport.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/packages/meshbay-hub/src/meshbay_hub/static/transport.js b/packages/meshbay-hub/src/meshbay_hub/static/transport.js
index d90c072..03eb919 100644
--- a/packages/meshbay-hub/src/meshbay_hub/static/transport.js
+++ b/packages/meshbay-hub/src/meshbay_hub/static/transport.js
@@ -676,6 +676,13 @@ class MeshBayTransport {
resolve();
};
});
+ // Marks it handled, and nothing else — `await channelReady` below still
+ // sees the rejection. Without it, a connect() that gives up earlier (at
+ // signaling, say) leaves this promise with nobody attached, and closing the
+ // peer connection then rejects it into an "Uncaught (in promise)
+ // DataChannel closed" on the console. Every failed reconnect attempt
+ // printed one, which is noise in exactly the log a freeze gets read from.
+ channelReady.catch(() => { /* the awaiter below reports it */ });
this._channel.onmessage = (event) => this._onMessage(event.data);
this._channel.onclose = (ev) => {