Fix: close http Response body on provider (#1154)

This commit is contained in:
Keyi Xie
2020-12-29 11:28:22 +08:00
committed by GitHub
parent 09c28e0355
commit 02d029dd2d
3 changed files with 4 additions and 0 deletions

View File

@ -34,6 +34,8 @@ func handleHTTP(request *inbound.HTTPAdapter, outbound net.Conn) {
}
handleResponse:
// resp will be closed after we call resp.Write()
// see https://golang.org/pkg/net/http/#Response.Write
resp, err := http.ReadResponse(outboundReader, req)
if err != nil {
break