Vanillaxi opened a new pull request, #3465: URL: https://github.com/apache/dubbo-go/pull/3465
## What - Change `duplexHTTPCall.CloseRead()` to close the response body directly instead of draining the remaining response body first. - Add regression tests for non-blocking close behavior across server-stream, bidi-stream, client-stream, and `duplexHTTPCall`. ## Why `CloseRead()` previously drained the remaining response body before closing it. If the server kept the response stream open, returned an error early, stopped reading the request side, or the transport stopped producing response bytes, client close paths such as `ServerStreamForClient.Close`, `BidiStreamForClient.CloseResponse`, and `ClientStreamForClient.CloseAndReceive` could block unnecessarily. This selectively ports only the stream close lifecycle behavior from the connect-go v1.18.0 fix without bringing in unrelated connect-go features. Fixes #3457 ## Tests ```bash go test ./protocol/triple/triple_protocol -run 'TestServerStreamCloseDoesNotDrainResponse|TestBidiStreamCloseResponseDoesNotDrainResponse|TestBidiStreamCloseResponseAfterServerStopsReading|TestClientStreamCloseAndReceiveAfterServerReturnsError|TestDuplexHTTPCallCloseReadDoesNotDrainResponseBody' -count=1 go test ./protocol/triple/triple_protocol go test ./protocol/triple ``` -- 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]
