fix cond of rpc encrypt

This commit is contained in:
sijie.sun
2025-07-25 09:13:42 +08:00
parent 601a0bf719
commit 78d8848ede

View File

@@ -86,7 +86,8 @@ impl PeerRpcManagerTransport for RpcTransport {
.get_route_peer_info(dst_peer_id)
.await
.and_then(|x| x.feature_flag.map(|x| x.is_public_server))
.unwrap_or(true);
// if dst is directly connected, it's must not public server
.unwrap_or(!peers.has_peer(dst_peer_id));
if !is_dst_peer_public_server {
self.encryptor
.encrypt(&mut msg)