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

Method ensureHeaders

coderd/aibridged/transport.go:197–201  ·  view source on GitHub ↗

ensureHeaders closes gotHeaders if it has not already been closed, with the current status. Used to unblock RoundTrip on handler return-without-write.

()

Source from the content-addressed store, hash-verified

195// ensureHeaders closes gotHeaders if it has not already been closed, with the
196// current status. Used to unblock RoundTrip on handler return-without-write.
197func (w *pipeResponseWriter) ensureHeaders() {
198 w.once.Do(func() {
199 close(w.gotHeaders)
200 })
201}
202
203var (
204 _ http.ResponseWriter = (*pipeResponseWriter)(nil)

Callers 1

RoundTripMethod · 0.95

Calls 1

DoMethod · 0.65

Tested by

no test coverage detected