diff options
author | Jan Tattermusch <jtattermusch@google.com> | 2016-03-10 14:38:27 -0800 |
---|---|---|
committer | Jan Tattermusch <jtattermusch@google.com> | 2016-03-10 14:38:27 -0800 |
commit | fa45a5e96c2f31682047bb96508c85bf7746642b (patch) | |
tree | 79cf4d4acca5982256b2bded970193d6a289106c /src | |
parent | 01dd7fe68b0e4874c4bbbd42dd08c42e323dc625 (diff) |
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); + } } } |