Files
SimpleRemoter/server
yuanyuanxianganddeepseek-flash 4d37d85bac Feature: share the device transfer gate with MCP file transfers
Preview and MCP must not run file transfers on one device at the same
time: MCP's stream interceptor is device-keyed and not tool-aware, so a
preview stream arriving while an upload/C2C session exists would be
swallowed. Claim the shared DeviceTransferGate in all three MCP entry
points (download/read, upload_file, copy_files_c2c) before touching the
pending/file-transfer registries, and release it in ClearFileTransfer.

C2C claims both src and dst atomically; a failed registry check releases
the claim before returning. The gate is acquired before m_PendingMutex
and m_FileXferMutex to keep the documented order.

Co-Authored-By: deepseek-flash
2026-12-05 15:30:30 +01:00
..