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

Method closeAndRemoveSession

agent/agentssh/x11.go:218–223  ·  view source on GitHub ↗

closeAndRemoveSession closes and removes the session.

(x11session *x11Session)

Source from the content-addressed store, hash-verified

216
217// closeAndRemoveSession closes and removes the session.
218func (x *x11Forwarder) closeAndRemoveSession(x11session *x11Session) {
219 _ = x11session.listener.Close()
220 x.mu.Lock()
221 delete(x.sessions, x11session)
222 x.mu.Unlock()
223}
224
225// createX11Session creates an X11 forwarding session.
226func (x *x11Forwarder) createX11Session(ctx context.Context, sshSession ssh.Session) (*x11Session, error) {

Callers 2

x11HandlerMethod · 0.95
listenForConnectionsMethod · 0.95

Calls 3

CloseMethod · 0.65
LockMethod · 0.45
UnlockMethod · 0.45

Tested by

no test coverage detected