Merge pull request #263 from awpr/close_header_chan

Close the header channel if a stream is reset while waiting for headers.
This commit is contained in:
Qi Zhao
2015-07-29 15:52:35 -07:00

View File

@ -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)