From 7ac9679659ba86109f667c3be814e4303f78973f Mon Sep 17 00:00:00 2001 From: Edward McFarlane Date: Mon, 30 Oct 2023 22:10:45 -0400 Subject: [PATCH] Fix connect.CloseResponse --- protocol_connect.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/protocol_connect.go b/protocol_connect.go index 86ca14c8..13012e75 100644 --- a/protocol_connect.go +++ b/protocol_connect.go @@ -498,10 +498,7 @@ func (cc *connectUnaryClientConn) ResponseTrailer() http.Header { } func (cc *connectUnaryClientConn) CloseResponse() error { - if response := cc.call.response; response != nil { - return response.Body.Close() - } - return nil + return cc.call.CloseRead() } func (cc *connectUnaryClientConn) onRequestSend(fn func(*http.Request)) {