MCPcopy
hub / github.com/PatchMon/PatchMon / SendDisconnect

Method SendDisconnect

server-source-code/internal/rdpproxy/session.go:422–433  ·  view source on GitHub ↗

SendDisconnect tells the agent to disconnect the RDP proxy. Writes go through the registry's per-agent mutex. If the session is already gone the call becomes a no-op.

(sessionID string)

Source from the content-addressed store, hash-verified

420// through the registry's per-agent mutex. If the session is already gone
421// the call becomes a no-op.
422func (s *Sessions) SendDisconnect(sessionID string) {
423 s.mu.RLock()
424 sess, ok := s.sessions[sessionID]
425 s.mu.RUnlock()
426 if !ok {
427 return
428 }
429 _ = sess.sender.SendJSON(sess.ApiID, map[string]interface{}{
430 "type": "rdp_proxy_disconnect",
431 "session_id": sessionID,
432 })
433}

Callers 1

ServeCreateTicketMethod · 0.80

Calls 1

SendJSONMethod · 0.65

Tested by

no test coverage detected