diff options
author | 2017-09-12 22:17:52 -0700 | |
---|---|---|
committer | 2017-09-12 22:17:52 -0700 | |
commit | f21e7ef6ff9cfac571a7f31f049688018c90e9cc (patch) | |
tree | 3f88abc2890e1725a27edc72f5a64b81a94e8dc8 /src/core | |
parent | 558e4c33b879cc0cb450303dbb3a4d8bead16d18 (diff) | |
parent | a6ede3bea1cde14ffd5fc7f9b80a27dcdee345d9 (diff) |
Merge pull request #12463 from yashykt/max_concurrent_streams_fix
Fix for max_concurrent_streams issue - Call mark_stream_closed beforeā¦
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/ext/transport/chttp2/transport/writing.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/ext/transport/chttp2/transport/writing.c b/src/core/ext/transport/chttp2/transport/writing.c index fa224a49a4..3fa38db4db 100644 --- a/src/core/ext/transport/chttp2/transport/writing.c +++ b/src/core/ext/transport/chttp2/transport/writing.c @@ -391,6 +391,8 @@ grpc_chttp2_begin_write_result grpc_chttp2_begin_write( s->id, GRPC_HTTP2_NO_ERROR, &s->stats.outgoing)); } + grpc_chttp2_mark_stream_closed(exec_ctx, t, s, !t->is_client, 1, + GRPC_ERROR_NONE); } result.early_results_scheduled |= update_list(exec_ctx, t, s, @@ -449,6 +451,8 @@ grpc_chttp2_begin_write_result grpc_chttp2_begin_write( &t->outbuf, grpc_chttp2_rst_stream_create( s->id, GRPC_HTTP2_NO_ERROR, &s->stats.outgoing)); } + grpc_chttp2_mark_stream_closed(exec_ctx, t, s, !t->is_client, 1, + GRPC_ERROR_NONE); now_writing = true; result.early_results_scheduled = true; grpc_chttp2_complete_closure_step( @@ -519,10 +523,6 @@ void grpc_chttp2_end_write(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, GRPC_ERROR_REF(error)); s->sending_bytes = 0; } - if (s->sent_trailing_metadata) { - grpc_chttp2_mark_stream_closed(exec_ctx, t, s, !t->is_client, 1, - GRPC_ERROR_REF(error)); - } GRPC_CHTTP2_STREAM_UNREF(exec_ctx, s, "chttp2_writing:end"); } grpc_slice_buffer_reset_and_unref_internal(exec_ctx, &t->outbuf); |