Skip to content

Commit

Permalink
Revert "To adhere with protocol the server should send RST_STREAM on …
Browse files Browse the repository at this point in the history
…observing timeout on a strea, (#1130)"

This reverts commit 6d0e6b0.
  • Loading branch information
menghanl authored and ejona86 committed Apr 21, 2017
1 parent 2d949be commit ef10a56
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
5 changes: 1 addition & 4 deletions transport/http2_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
}

Expand Down
3 changes: 0 additions & 3 deletions transport/http2_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ef10a56

Please sign in to comment.