()
| 283 | } |
| 284 | |
| 285 | func (s *Session) cleanup() { |
| 286 | s.cleanupOnce.Do(func() { |
| 287 | if s.removeFromMap != nil { |
| 288 | s.removeFromMap() |
| 289 | } |
| 290 | if s.cancel != nil { |
| 291 | s.cancel() |
| 292 | } |
| 293 | if s.Listener != nil { |
| 294 | _ = s.Listener.Close() |
| 295 | } |
| 296 | s.closeGuacdConn() |
| 297 | }) |
| 298 | } |
| 299 | |
| 300 | // OnAgentData is called when the agent sends rdp_proxy_data. It forwards to the guacd connection. |
| 301 | func (s *Sessions) OnAgentData(apiID string, sessionID string, data string) { |
no test coverage detected