aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2016-01-04 16:49:40 -0800
committerGravatar Craig Tiller <ctiller@google.com>2016-01-04 16:49:40 -0800
commit9bda5a8f0be644e275a69efbc409a3b23a3bfbb7 (patch)
tree7fc657a97b5df9a535eb2f5e66e901441a77f427
parentb1fe7d6758e52800d0126a75b84b8cac8b41557e (diff)
parentb4aa08cb9f5bfdff4a8a8821fdd2c60e18dfbec8 (diff)
Merge pull request #4554 from yang-g/stalled_and_destroy
remove stream from stalled_by_transport list before destroy it
-rw-r--r--src/core/transport/chttp2/internal.h3
-rw-r--r--src/core/transport/chttp2/stream_lists.c8
-rw-r--r--src/core/transport/chttp2_transport.c1
3 files changed, 12 insertions, 0 deletions
diff --git a/src/core/transport/chttp2/internal.h b/src/core/transport/chttp2/internal.h
index 4ad900378b..e54940098a 100644
--- a/src/core/transport/chttp2/internal.h
+++ b/src/core/transport/chttp2/internal.h
@@ -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,
diff --git a/src/core/transport/chttp2/stream_lists.c b/src/core/transport/chttp2/stream_lists.c
index 49f951d08b..273a513e2f 100644
--- a/src/core/transport/chttp2/stream_lists.c
+++ b/src/core/transport/chttp2/stream_lists.c
@@ -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) {
diff --git a/src/core/transport/chttp2_transport.c b/src/core/transport/chttp2_transport.c
index 70f7eed4fe..2cd0185dfa 100644
--- a/src/core/transport/chttp2_transport.c
+++ b/src/core/transport/chttp2_transport.c
@@ -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);