diff options
author | Craig Tiller <ctiller@google.com> | 2016-10-28 07:22:08 -0700 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2016-10-28 07:22:08 -0700 |
commit | b7982319c9e43a4219a1517dec97b1c6876b439d (patch) | |
tree | a14da6953b81aa91c4ac6dd3e1615ea54807a29a /src/core/ext/transport | |
parent | 28b72428a84ae7d23c106fb282478fa94951c9c0 (diff) | |
parent | 6628e36a89b3ec709477b7ff494ec5e237ac8231 (diff) |
Merge github.com:grpc/grpc into grpc_slice
Diffstat (limited to 'src/core/ext/transport')
-rw-r--r-- | src/core/ext/transport/chttp2/transport/chttp2_transport.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index 3df64faa1f..1ffa9165b2 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -1023,9 +1023,14 @@ static void perform_stream_op_locked(grpc_exec_ctx *exec_ctx, void *stream_op, } if (!s->write_closed) { if (t->is_client) { - GPR_ASSERT(s->id == 0); - grpc_chttp2_list_add_waiting_for_concurrency(t, s); - maybe_start_some_streams(exec_ctx, t); + if (!t->closed) { + GPR_ASSERT(s->id == 0); + grpc_chttp2_list_add_waiting_for_concurrency(t, s); + maybe_start_some_streams(exec_ctx, t); + } else { + grpc_chttp2_cancel_stream(exec_ctx, t, s, + GRPC_ERROR_CREATE("Transport closed")); + } } else { GPR_ASSERT(s->id != 0); grpc_chttp2_become_writable(exec_ctx, t, s, true, @@ -2190,7 +2195,7 @@ static void destructive_reclaimer_locked(grpc_exec_ctx *exec_ctx, void *arg, GRPC_ERROR_INT_HTTP2_ERROR, GRPC_CHTTP2_ENHANCE_YOUR_CALM)); if (n > 1) { - /* Since we cancel one stream per destructive reclaimation, if + /* Since we cancel one stream per destructive reclamation, if there are more streams left, we can immediately post a new reclaimer in case the resource quota needs to free more memory */ |