@actuallab/rpc 12.3.76 → 12.3.79
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.cjs +2 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -2364,6 +2364,7 @@ var RpcPeer = class {
|
|
|
2364
2364
|
this._connection = conn;
|
|
2365
2365
|
conn.messageReceived.add((raw) => this._handleMessage(raw));
|
|
2366
2366
|
conn.closed.add((ev) => {
|
|
2367
|
+
if (this._connection !== conn) return;
|
|
2367
2368
|
this._connection = void 0;
|
|
2368
2369
|
this._isConnected = false;
|
|
2369
2370
|
if (ev.reason)
|
|
@@ -2982,6 +2983,7 @@ var RpcServerPeer = class extends RpcPeer {
|
|
|
2982
2983
|
this._setConnectionState(1 /* Connecting */);
|
|
2983
2984
|
this.setupConnection(conn);
|
|
2984
2985
|
conn.closed.add(() => {
|
|
2986
|
+
if (this._connection !== conn && this._connection !== void 0) return;
|
|
2985
2987
|
this.sharedObjects.disconnectAll();
|
|
2986
2988
|
});
|
|
2987
2989
|
}
|