You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@thrift.apache.org by GitBox <gi...@apache.org> on 2020/12/14 20:52:28 UTC

[GitHub] [thrift] dcelasun commented on a change in pull request #2293: THRIFT-5324: reset http client buffer after flush

dcelasun commented on a change in pull request #2293:
URL: https://github.com/apache/thrift/pull/2293#discussion_r542771190



##########
File path: lib/go/thrift/http_client.go
##########
@@ -197,6 +197,10 @@ func (p *THttpClient) Flush(ctx context.Context) error {
 	// Close any previous response body to avoid leaking connections.
 	p.closeResponse()
 
+	// Request might not have been fully read by http client.
+	// Reset so we don't send the remains on next call.
+	defer p.requestBuffer.Reset()

Review comment:
       Needs a nil check.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org