Merge pull request #23984 from yashykt/removestreamfromlists

Remove stream from stalled lists on remove_stream
pull/24003/head
Yash Tibrewal 4 years ago committed by GitHub
commit ae16067f50
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      src/core/ext/transport/chttp2/transport/chttp2_transport.cc
  2. 4
      src/core/ext/transport/chttp2/transport/internal.h

@ -675,9 +675,6 @@ grpc_chttp2_stream::~grpc_chttp2_stream() {
grpc_slice_buffer_destroy_internal(&decompressed_data_buffer);
}
grpc_chttp2_list_remove_stalled_by_transport(t, this);
grpc_chttp2_list_remove_stalled_by_stream(t, this);
for (int i = 0; i < STREAM_LIST_COUNT; i++) {
if (GPR_UNLIKELY(included[i])) {
gpr_log(GPR_ERROR, "%s stream %d still included in list %d",
@ -2030,6 +2027,8 @@ static void remove_stream(grpc_chttp2_transport* t, uint32_t id,
if (grpc_chttp2_list_remove_writable_stream(t, s)) {
GRPC_CHTTP2_STREAM_UNREF(s, "chttp2_writing:remove_stream");
}
grpc_chttp2_list_remove_stalled_by_stream(t, s);
grpc_chttp2_list_remove_stalled_by_transport(t, s);
GRPC_ERROR_UNREF(error);

@ -52,8 +52,12 @@ class ContextList;
/* streams are kept in various linked lists depending on what things need to
happen to them... this enum labels each list */
typedef enum {
/* If a stream is in the following two lists, an explicit ref is associated
with the stream */
GRPC_CHTTP2_LIST_WRITABLE,
GRPC_CHTTP2_LIST_WRITING,
/* No additional ref is taken for the following refs. Make sure to remove the
stream from these lists when the stream is removed. */
GRPC_CHTTP2_LIST_STALLED_BY_TRANSPORT,
GRPC_CHTTP2_LIST_STALLED_BY_STREAM,
/** streams that are waiting to start because there are too many concurrent

Loading…
Cancel
Save