Merge pull request #4554 from yang-g/stalled_and_destroy

remove stream from stalled_by_transport list before destroy it
pull/4630/head
Craig Tiller 9 years ago
commit 9bda5a8f0b
  1. 3
      src/core/transport/chttp2/internal.h
  2. 8
      src/core/transport/chttp2/stream_lists.c
  3. 1
      src/core/transport/chttp2_transport.c

@ -566,6 +566,9 @@ void grpc_chttp2_list_add_stalled_by_transport(
int grpc_chttp2_list_pop_stalled_by_transport(
grpc_chttp2_transport_global *transport_global,
grpc_chttp2_stream_global **stream_global);
void grpc_chttp2_list_remove_stalled_by_transport(
grpc_chttp2_transport_global *transport_global,
grpc_chttp2_stream_global *stream_global);
void grpc_chttp2_list_add_unannounced_incoming_window_available(
grpc_chttp2_transport_global *transport_global,

@ -333,6 +333,14 @@ int grpc_chttp2_list_pop_stalled_by_transport(
return r;
}
void grpc_chttp2_list_remove_stalled_by_transport(
grpc_chttp2_transport_global *transport_global,
grpc_chttp2_stream_global *stream_global) {
stream_list_maybe_remove(TRANSPORT_FROM_GLOBAL(transport_global),
STREAM_FROM_GLOBAL(stream_global),
GRPC_CHTTP2_LIST_STALLED_BY_TRANSPORT);
}
void grpc_chttp2_list_add_closed_waiting_for_parsing(
grpc_chttp2_transport_global *transport_global,
grpc_chttp2_stream_global *stream_global) {

@ -524,6 +524,7 @@ static void destroy_stream(grpc_exec_ctx *exec_ctx, grpc_transport *gt,
grpc_chttp2_list_remove_writable_stream(&t->global, &s->global);
grpc_chttp2_list_remove_unannounced_incoming_window_available(&t->global,
&s->global);
grpc_chttp2_list_remove_stalled_by_transport(&t->global, &s->global);
gpr_mu_unlock(&t->mu);

Loading…
Cancel
Save