MCPcopy Index your code
hub / github.com/PatchMon/PatchMon / cleanup

Method cleanup

server-source-code/internal/rdpproxy/session.go:285–298  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

283}
284
285func (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.
301func (s *Sessions) OnAgentData(apiID string, sessionID string, data string) {

Callers 5

bridgeGuacdToAgentMethod · 0.95
timeoutLoopMethod · 0.95
OnAgentErrorMethod · 0.80
OnAgentClosedMethod · 0.80
DeleteMethod · 0.80

Calls 2

closeGuacdConnMethod · 0.95
CloseMethod · 0.45

Tested by

no test coverage detected