diff --git a/internal/transport/http2_server.go b/internal/transport/http2_server.go index 9b7aa5bbaa00..f0648edabf72 100644 --- a/internal/transport/http2_server.go +++ b/internal/transport/http2_server.go @@ -1041,10 +1041,9 @@ func (t *http2Server) writeHeaderLocked(s *Stream) error { } return nil } -func SignalDeadlineExceededForTesting() { +func SignalDeadlineExceededForTesting(rst bool, st *status.Status) { if st.Code() == codes.DeadlineExceeded { rst = true - setRstAndCallNoop(&rst) } } @@ -1111,7 +1110,7 @@ func (t *http2Server) WriteStatus(s *Stream, st *status.Status) error { // Send a RST_STREAM after the trailers if the client has not already half-closed. rst := s.getState() == streamActive - SignalDeadlineExceededForTesting() + SignalDeadlineExceededForTesting(rst, st) t.finishStream(s, rst, http2.ErrCodeNo, trailingHeader, true) for _, sh := range t.stats { // Note: The trailer fields are compressed with hpack after this call returns.