From cb5e9415424c0d4dd874518c834f141813bbf348 Mon Sep 17 00:00:00 2001 From: Menghan Li Date: Fri, 21 Apr 2017 15:40:49 -0700 Subject: [PATCH 1/2] Revert "Make sure all in-flight streams close when ClientConn.Close() is called. (#1136)" This reverts commit 2d949be2fe6224c36ae58b48246d8ee938810396. From cb7a490aa8f9c5b481aff2275d0e60cd1000d981 Mon Sep 17 00:00:00 2001 From: Menghan Li Date: Fri, 21 Apr 2017 15:40:49 -0700 Subject: [PATCH 2/2] 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 0c1582a48217..486d4a10438e 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 9271bb47cc17..31fefc7bb7cc 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