MCPcopy Create free account
hub / github.com/imroc/req / BreakWithError

Method BreakWithError

internal/http2/pipe.go:116–116  ·  view source on GitHub ↗

BreakWithError causes the next Read (waking up a current blocked Read if needed) to return the provided err immediately, without waiting for unread data.

(err error)

Source from the content-addressed store, hash-verified

114// Read if needed) to return the provided err immediately, without
115// waiting for unread data.
116func (p *pipe) BreakWithError(err error) { p.closeWithError(&p.breakErr, err, nil) }
117
118// closeWithErrorAndCode is like CloseWithError but also sets some code to run
119// in the caller's goroutine before returning the error.

Callers 1

CloseMethod · 0.80

Calls 1

closeWithErrorMethod · 0.95

Tested by

no test coverage detected