MCPcopy Create free account
hub / github.com/coder/aibridge / flush

Function flush

intercept/eventstream/eventstream.go:235–248  ·  view source on GitHub ↗
(w http.ResponseWriter)

Source from the content-addressed store, hash-verified

233}
234
235func flush(w http.ResponseWriter) (err error) {
236 flusher, ok := w.(http.Flusher)
237 if !ok || flusher == nil {
238 return xerrors.New("SSE not supported")
239 }
240
241 defer func() {
242 if r := recover(); r != nil { //nolint:revive,staticcheck // Intentionally swallowed; likely a broken connection.
243 }
244 }()
245
246 flusher.Flush()
247 return nil
248}

Callers 2

InitiateStreamMethod · 0.85
StartMethod · 0.85

Calls 1

FlushMethod · 0.80

Tested by

no test coverage detected