Merge pull request #617 from iamqizhao/master

Added the unmapped http2 error and fixed a related bug in RST_STREAM …
This commit is contained in:
Menghan Li
2016-03-29 13:58:50 -07:00
2 changed files with 2 additions and 0 deletions

View File

@ -636,6 +636,7 @@ func (t *http2Client) handleRSTStream(f *http2.RSTStreamFrame) {
s.statusCode, ok = http2ErrConvTab[http2.ErrCode(f.ErrCode)]
if !ok {
grpclog.Println("transport: http2Client.handleRSTStream found no mapped gRPC status for the received http2 error ", f.ErrCode)
s.statusCode = codes.Unknown
}
s.mu.Unlock()
s.write(recvMsg{err: io.EOF})

View File

@ -69,6 +69,7 @@ var (
http2.ErrCodeInternal: codes.Internal,
http2.ErrCodeFlowControl: codes.ResourceExhausted,
http2.ErrCodeSettingsTimeout: codes.Internal,
http2.ErrCodeStreamClosed: codes.Internal,
http2.ErrCodeFrameSize: codes.Internal,
http2.ErrCodeRefusedStream: codes.Unavailable,
http2.ErrCodeCancel: codes.Canceled,