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

Method errorThenClose

coderd/workspaceconnwatcher/watcher.go:329–333  ·  view source on GitHub ↗
(err workspacesdk.WatchError)

Source from the content-addressed store, hash-verified

327}
328
329func (u *updater) errorThenClose(err workspacesdk.WatchError) {
330 _ = u.enc.Encode(workspacesdk.ConnectionWatchEvent{Error: &err})
331 // ignore encoding errors above because in any case, we are going to close the connection.
332 _ = u.conn.Close(websocket.StatusNormalClosure, "error")
333}

Callers 3

runMethod · 0.95
buildUpdateMethod · 0.95
maybeSendAgentUpdateMethod · 0.95

Calls 2

EncodeMethod · 0.80
CloseMethod · 0.65

Tested by

no test coverage detected