Delete removes a session (e.g. when ticket is consumed and tunnel is done).
(sessionID string)
| 408 | |
| 409 | // Delete removes a session (e.g. when ticket is consumed and tunnel is done). |
| 410 | func (s *Sessions) Delete(sessionID string) { |
| 411 | s.mu.RLock() |
| 412 | sess, ok := s.sessions[sessionID] |
| 413 | s.mu.RUnlock() |
| 414 | if ok { |
| 415 | sess.cleanup() |
| 416 | } |
| 417 | } |
| 418 | |
| 419 | // SendDisconnect tells the agent to disconnect the RDP proxy. Writes go |
| 420 | // through the registry's per-agent mutex. If the session is already gone |