MCPcopy Index your code
hub / github.com/coder/coder / Close

Method Close

coderd/workspaceapps/proxy.go:139–152  ·  view source on GitHub ↗

Close waits for all reconnecting-pty WebSocket connections to drain before returning.

()

Source from the content-addressed store, hash-verified

137// Close waits for all reconnecting-pty WebSocket connections to drain before
138// returning.
139func (s *Server) Close() error {
140 s.websocketWaitMutex.Lock()
141 s.websocketWaitGroup.Wait()
142 s.websocketWaitMutex.Unlock()
143
144 if s.StatsCollector != nil {
145 _ = s.StatsCollector.Close()
146 }
147
148 // The caller must close the SignedTokenProvider and the AgentProvider (if
149 // necessary).
150
151 return nil
152}
153
154func (s *Server) Attach(r chi.Router) {
155 servePathApps := func(r chi.Router) {

Callers 2

TestPushFunction · 0.95
TestSSRFPreventionFunction · 0.95

Calls 4

WaitMethod · 0.65
CloseMethod · 0.65
LockMethod · 0.45
UnlockMethod · 0.45

Tested by 2

TestPushFunction · 0.76
TestSSRFPreventionFunction · 0.76