Alanxtl commented on code in PR #3466:
URL: https://github.com/apache/dubbo-go/pull/3466#discussion_r3503180120
##########
protocol/triple/triple_protocol/duplex_http_call.go:
##########
@@ -193,9 +193,9 @@ func (d *duplexHTTPCall) CloseRead() error {
if d.response == nil {
return nil
}
- if err := discard(d.response.Body); err != nil {
- return wrapIfRSTError(err)
- }
+ // CloseRead is a cleanup path. Do not drain the response body here: if
the
+ // peer stops writing or keeps the stream open, draining can block close
+ // indefinitely. Callers that need final trailers should receive until
EOF.
Review Comment:
这种一看就是ai生成的comment要注意一下人类能不能看懂
因为人是不知道之前这里删了代码的
--
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]