From 09f4ba59776f8d5394355ffb0fc92f21ce597f39 Mon Sep 17 00:00:00 2001 From: liujinchang Date: Fri, 30 Oct 2026 03:09:05 +0800 Subject: [PATCH] fix: restore concurrent transfer check in rpc handler MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. Root cause: checkTransCanConnect() was commented out in handlerpcservice.cpp, disabling concurrent transfer detection 2. Fix: uncomment the call to restore concurrent transfer checking, preventing connection competition when two apps transfer to same device 3. Impact: second concurrent transfer request is now rejected instead of causing network error on receiving device Log: fix concurrent transfer conflict between file transfer and cooperation Influence: 1. Test concurrent file transfer from two apps to same device 2. Test file transfer after network disconnection and reconnection 3. Verify normal single-app file transfer still works fix: 恢复 RPC 处理器中的并发传输检查 1. 根因:handlerpcservice.cpp 中 checkTransCanConnect() 被注释禁用, 并发传输检查失效 2. 方案:取消注释恢复 checkTransCanConnect() 调用,防止两个应用 同时向同一设备发起传输时连接竞争导致接收失败 3. 影响:第二个并发传输请求将被拒绝,而非导致接收端网络错误 Log: 修复文件投送与跨端协同同时投送文件到同一设备的接收错误 Influence: 1. 测试两个应用同时向同一设备投送文件 2. 测试断网后重新发起文件传输 3. 验证单一应用正常文件传输不受影响 PMS: BUG-250595 --- src/plugins/daemon/core/service/rpc/handlerpcservice.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/daemon/core/service/rpc/handlerpcservice.cpp b/src/plugins/daemon/core/service/rpc/handlerpcservice.cpp index 310ea8171..9502c55f4 100644 --- a/src/plugins/daemon/core/service/rpc/handlerpcservice.cpp +++ b/src/plugins/daemon/core/service/rpc/handlerpcservice.cpp @@ -138,7 +138,7 @@ bool HandleRpcService::handleRemoteLogin(co::Json &info) JobManager::instance()->confirmTransfer(lo.appName.c_str()); } } - bool statu = true;//Comshare::instance()->checkTransCanConnect(); + bool statu = Comshare::instance()->checkTransCanConnect(); if (!authOK || !statu) { lores.result = false; lores.token = authOK ? "connect file status error!" : "Invalid auth code";