MCPcopy
hub / github.com/1Panel-dev/KubePi / Close

Method Close

pkg/logging/logging.go:52–63  ·  view source on GitHub ↗
(sessionId, reason string, status uint32)

Source from the content-addressed store, hash-verified

50}
51
52func (sm *SessionMap) Close(sessionId, reason string, status uint32) {
53 if _, ok := sm.Sessions[sessionId]; !ok {
54 return
55 }
56 sm.Lock.Lock()
57 defer sm.Lock.Unlock()
58 err := sm.Sessions[sessionId].sockJSSession.Close(status, reason)
59 if err != nil {
60 log.Println(err)
61 }
62 delete(sm.Sessions, sessionId)
63}
64
65func (sm *SessionMap) Clean() {
66 for _, v := range sm.Sessions {

Callers

nothing calls this directly

Calls 1

CloseMethod · 0.65

Tested by

no test coverage detected