MCPcopy
hub / github.com/caddyserver/caddy / Close

Method Close

modules/caddyhttp/reverseproxy/reverseproxy.go:1816–1827  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1814}
1815
1816func (brc bodyReadCloser) Close() error {
1817 // Inside this package this will be set to nil for fully-buffered
1818 // requests due to the possibility of retrial.
1819 if brc.buf != nil {
1820 bufPool.Put(brc.buf)
1821 }
1822 // For fully-buffered bodies, body is nil, so Close is a no-op.
1823 if brc.body != nil {
1824 return brc.body.Close()
1825 }
1826 return nil
1827}
1828
1829// bufPool is used for buffering requests and responses.
1830var bufPool = sync.Pool{

Callers 11

handleUpgradeResponseMethod · 0.45
closeConnectionsMethod · 0.45
NewTransportMethod · 0.45
doActiveHealthCheckMethod · 0.45
CloseMethod · 0.45
reverseProxyMethod · 0.45
finalizeResponseMethod · 0.45
bufferedBodyMethod · 0.45
ServeHTTPMethod · 0.45

Calls

no outgoing calls