ferhatelmas commented on code in PR #655:
URL: https://github.com/apache/iceberg-go/pull/655#discussion_r2642910001


##########
catalog/rest/rest.go:
##########
@@ -266,6 +266,10 @@ func do[T any](ctx context.Context, method string, baseURI 
*url.URL, path []stri
        if rsp, err = cl.Do(req); err != nil {
                return ret, err
        }
+       defer func() {
+               _, _ = io.Copy(io.Discard, rsp.Body)

Review Comment:
   no it should be consumed per https://pkg.go.dev/net/http#Response
   
   > // It is the caller's responsibility to
   > // close Body. The default HTTP client's Transport may not
   > // reuse HTTP/1.x "keep-alive" TCP connections if the Body is
   > // not read to completion and closed.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to