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

Method Close

codersdk/workspacesdk/agentconn.go:187–199  ·  view source on GitHub ↗

Close ends the connection to the workspace agent.

()

Source from the content-addressed store, hash-verified

185
186// Close ends the connection to the workspace agent.
187func (c *agentConn) Close() error {
188 var cerr error
189 if c.opts.CloseFunc != nil {
190 cerr = c.opts.CloseFunc()
191 if xerrors.Is(cerr, ErrSkipClose) {
192 return nil
193 }
194 }
195 if cerr != nil {
196 return multierror.Append(cerr, c.Conn.Close())
197 }
198 return c.Conn.Close()
199}
200
201// AgentReconnectingPTYInit initializes a new reconnecting PTY session.
202// @typescript-ignore AgentReconnectingPTYInit

Callers

nothing calls this directly

Calls 3

CloseMethod · 0.65
IsMethod · 0.45
AppendMethod · 0.45

Tested by

no test coverage detected