diff --git a/transport/http2_client.go b/transport/http2_client.go index e9e85434..ed38544a 100644 --- a/transport/http2_client.go +++ b/transport/http2_client.go @@ -581,6 +581,10 @@ func (t *http2Client) handleRSTStream(f *http2.RSTStreamFrame) { return } s.state = streamDone + if !s.headerDone { + close(s.headerChan) + s.headerDone = true + } s.statusCode, ok = http2RSTErrConvTab[http2.ErrCode(f.ErrCode)] if !ok { grpclog.Println("transport: http2Client.handleRSTStream found no mapped gRPC status for the received http2 error ", f.ErrCode)