MCPcopy Create free account
hub / github.com/coder/coder / Close

Method Close

enterprise/derpmesh/derpmesh.go:145–156  ·  view source on GitHub ↗

Close ends all active meshes with the DERP server.

()

Source from the content-addressed store, hash-verified

143
144// Close ends all active meshes with the DERP server.
145func (m *Mesh) Close() error {
146 m.mutex.Lock()
147 defer m.mutex.Unlock()
148 if m.isClosed() {
149 return nil
150 }
151 close(m.closed)
152 for _, cancelFunc := range m.active {
153 cancelFunc()
154 }
155 return nil
156}
157
158func (m *Mesh) isClosed() bool {
159 select {

Callers

nothing calls this directly

Calls 3

isClosedMethod · 0.95
LockMethod · 0.45
UnlockMethod · 0.45

Tested by

no test coverage detected