diff options
author | Craig Tiller <ctiller@google.com> | 2016-03-11 03:30:18 -0800 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2016-03-11 03:30:18 -0800 |
commit | 180ca8635057f2dddeef88d6f4ce5d8f13074b4a (patch) | |
tree | 66f77e7730a43b03ef6fae4614188f895fbeafae /src | |
parent | fbdf51b07e56d0794776e40bc3a4a054e1883f0e (diff) | |
parent | fa45a5e96c2f31682047bb96508c85bf7746642b (diff) |
Merge pull request #5704 from jtattermusch/fix_python_beta_stream_stream
Fix race between send message and send initial metadata
Diffstat (limited to 'src')
-rw-r--r-- | src/core/transport/chttp2_transport.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/transport/chttp2_transport.c b/src/core/transport/chttp2_transport.c index 19265252ca..03444fd4c2 100644 --- a/src/core/transport/chttp2_transport.c +++ b/src/core/transport/chttp2_transport.c @@ -851,9 +851,11 @@ static void perform_stream_op_locked( if (stream_global->write_closed) { grpc_chttp2_complete_closure_step( exec_ctx, &stream_global->send_message_finished, 0); - } else if (stream_global->id != 0) { + } else { stream_global->send_message = op->send_message; - grpc_chttp2_become_writable(transport_global, stream_global); + if (stream_global->id != 0) { + grpc_chttp2_become_writable(transport_global, stream_global); + } } } |