MCPcopy Index your code
hub / github.com/subtrace/subtrace / remove

Method remove

devtools/devtools.go:106–115  ·  view source on GitHub ↗
(conn *websocket.Conn)

Source from the content-addressed store, hash-verified

104}
105
106func (s *Server) remove(conn *websocket.Conn) {
107 s.mu.Lock()
108 defer s.mu.Unlock()
109 for i := range s.conns {
110 if s.conns[i] == conn {
111 s.conns = append(s.conns[:i], s.conns[i+1:]...)
112 return
113 }
114 }
115}
116
117func (s *Server) snapshot() []*websocket.Conn {
118 s.mu.Lock()

Callers 1

websocketMethod · 0.95

Calls 1

LockMethod · 0.80

Tested by

no test coverage detected