diff options
author | Craig Tiller <ctiller@google.com> | 2016-03-03 21:09:31 -0800 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2016-03-03 21:09:31 -0800 |
commit | 1bd9ea407fd673f6c795a524c6454bc5db339a85 (patch) | |
tree | 56b70599b0b9298cb15d04bd01055bd939bebefc /src | |
parent | 389297dedfe384246d4831a4fc33e7af7b0200e5 (diff) |
Refine condition
Diffstat (limited to 'src')
-rw-r--r-- | src/core/transport/chttp2_transport.c | 5 | ||||
-rw-r--r-- | src/core/transport/transport.h | 3 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/core/transport/chttp2_transport.c b/src/core/transport/chttp2_transport.c index 369ff0ad7f..cf1dbfa0e5 100644 --- a/src/core/transport/chttp2_transport.c +++ b/src/core/transport/chttp2_transport.c @@ -1006,8 +1006,9 @@ static void perform_transport_op(grpc_exec_ctx *exec_ctx, grpc_transport *gt, lock(t); - /* Let's be overly cautious: don't change any state while we're parsing */ - if (t->parsing_active) { + /* If there's a set_accept_stream ensure that we're not parsing + to avoid changing things out from underneath */ + if (t->parsing_active && t->set_accept_stream) { GPR_ASSERT(t->post_parsing_op == NULL); t->post_parsing_op = gpr_malloc(sizeof(*op)); memcpy(t->post_parsing_op, op, sizeof(*op)); diff --git a/src/core/transport/transport.h b/src/core/transport/transport.h index 5a90bd6d38..ed6e121c9c 100644 --- a/src/core/transport/transport.h +++ b/src/core/transport/transport.h @@ -123,8 +123,7 @@ typedef struct grpc_transport_stream_op { /** Transport op: a set of operations to perform on a transport as a whole */ typedef struct grpc_transport_op { - /** Called when processing of this op is done. - Only one transport_op is allowed to be outstanding at any time. */ + /** Called when processing of this op is done. */ grpc_closure *on_consumed; /** connectivity monitoring - set connectivity_state to NULL to unsubscribe */ grpc_closure *on_connectivity_state_change; |