server: fix connectRPCObject gc race condition

This commit is contained in:
Koushik Dutta
2024-07-29 13:43:52 -07:00
parent 7c94ed9b50
commit 1aa1df885d
2 changed files with 11 additions and 5 deletions

View File

@@ -417,6 +417,10 @@ class PluginRemote:
def onProxySerialization(value: Any, proxyId: str, sourcePeerPort: int = None):
properties: dict = rpc.RpcPeer.prepareProxyProperties(value) or {}
clusterEntry = properties.get('__cluster', None)
if clusterEntry and clusterPort == clusterEntry['port'] and sourcePeerPort != clusterEntry.get('sourcePort', None):
clusterEntry = None
if not properties.get('__cluster', None):
clusterEntry: ClusterObject = {
'id': clusterId,