diff options
author | Craig Tiller <ctiller@google.com> | 2016-10-27 15:30:21 -0700 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2016-10-27 15:30:21 -0700 |
commit | 0f7eb30aecc279f439edbc8d12ea0da556865db1 (patch) | |
tree | 2b64a2fb44292ddef18a83aabe961b2f2368ebed /src/core/ext/transport | |
parent | 86cb138ee9c852839dfd33529e8634ffe09d896e (diff) |
Handle calls that are started after transport closure
Diffstat (limited to 'src/core/ext/transport')
-rw-r--r-- | src/core/ext/transport/chttp2/transport/chttp2_transport.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index 57da5c5c1e..4a9f806354 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -1022,9 +1022,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, |