From ef10a566fe15acffda908d3aa6ac7126262b1861 Mon Sep 17 00:00:00 2001 From: Menghan Li Date: Fri, 21 Apr 2017 15:40:49 -0700 Subject: [PATCH] Revert "To adhere with protocol the server should send RST_STREAM on observing timeout on a strea, (#1130)" This reverts commit 6d0e6b04b3cd553e2007ef075fd2445a192e4c0d. --- transport/http2_client.go | 5 +---- transport/http2_server.go | 3 --- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/transport/http2_client.go b/transport/http2_client.go index 0c1582a48..486d4a104 100644 --- a/transport/http2_client.go +++ b/transport/http2_client.go @@ -560,12 +560,9 @@ func (t *http2Client) CloseStream(s *Stream, err error) { } s.state = streamDone s.mu.Unlock() - if se, ok := err.(StreamError); ok { + if _, ok := err.(StreamError); ok { rstStream = true rstError = http2.ErrCodeCancel - if se.Code == codes.DeadlineExceeded { - rstError = http2.ErrCodeInternal - } } } diff --git a/transport/http2_server.go b/transport/http2_server.go index 9271bb47c..31fefc7bb 100644 --- a/transport/http2_server.go +++ b/transport/http2_server.go @@ -741,9 +741,6 @@ func (t *http2Server) WriteStatus(s *Stream, st *status.Status) error { } t.stats.HandleRPC(s.Context(), outTrailer) } - if statusCode == codes.DeadlineExceeded { - t.controlBuf.put(&resetStream{s.id, http2.ErrCodeInternal}) - } t.closeStream(s) t.writableChan <- 0 return nil