MCPcopy Create free account
hub / github.com/78/tenbox / CloseRemoteSession

Method CloseRemoteSession

src/daemon/cloud_tunnel.cpp:1968–1981  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1966}
1967
1968nlohmann::json CloudTunnel::CloseRemoteSession(const std::string& vm_id, const nlohmann::json& payload) {
1969 const std::string session_id = payload.value("session_id", "");
1970 if (!remote_sessions_.Close(vm_id, session_id)) {
1971 return Error("remote_session_not_found", "remote session not found");
1972 }
1973 {
1974 std::lock_guard<std::mutex> lock(remote_peers_mu_);
1975 remote_peers_.erase(session_id);
1976 }
1977 // Drop the per-VM clipboard subscriber so a future session can re-attach
1978 // without inheriting a stale capture.
1979 runtime_manager_.ClearClipboardCallback(vm_id);
1980 return {{"session_id", session_id}, {"closed", true}};
1981}
1982
1983nlohmann::json CloudTunnel::HandleRemoteSignal(
1984 const std::string& vm_id,

Callers

nothing calls this directly

Calls 3

ErrorFunction · 0.70
CloseMethod · 0.45

Tested by

no test coverage detected