@actuallab/rpc 12.3.70 → 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.js
CHANGED
|
@@ -2259,6 +2259,7 @@ var RpcPeer = class {
|
|
|
2259
2259
|
this._connection = conn;
|
|
2260
2260
|
conn.messageReceived.add((raw) => this._handleMessage(raw));
|
|
2261
2261
|
conn.closed.add((ev) => {
|
|
2262
|
+
if (this._connection !== conn) return;
|
|
2262
2263
|
this._connection = void 0;
|
|
2263
2264
|
this._isConnected = false;
|
|
2264
2265
|
if (ev.reason)
|
|
@@ -2877,6 +2878,7 @@ var RpcServerPeer = class extends RpcPeer {
|
|
|
2877
2878
|
this._setConnectionState(1 /* Connecting */);
|
|
2878
2879
|
this.setupConnection(conn);
|
|
2879
2880
|
conn.closed.add(() => {
|
|
2881
|
+
if (this._connection !== conn && this._connection !== void 0) return;
|
|
2880
2882
|
this.sharedObjects.disconnectAll();
|
|
2881
2883
|
});
|
|
2882
2884
|
}
|