diff options
author | 2018-10-25 11:55:14 -0700 | |
---|---|---|
committer | 2018-10-25 11:55:14 -0700 | |
commit | cad9be088920b6e02a91d21a78f0e98d8c8d9f20 (patch) | |
tree | 0e417a23792bae09c8b607d208dfab6be5100ae9 /src/core/ext/transport | |
parent | 40d443de1b7cb6380e23d4fe97027f2a7541b1f8 (diff) |
Add comments about the fix
Diffstat (limited to 'src/core/ext/transport')
-rw-r--r-- | src/core/ext/transport/chttp2/client/chttp2_connector.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/ext/transport/chttp2/client/chttp2_connector.cc b/src/core/ext/transport/chttp2/client/chttp2_connector.cc index cfce2280fc..aca9894e82 100644 --- a/src/core/ext/transport/chttp2/client/chttp2_connector.cc +++ b/src/core/ext/transport/chttp2/client/chttp2_connector.cc @@ -216,6 +216,12 @@ static void chttp2_connector_connect(grpc_connector* con, grpc_closure* closure = &c->connected; grpc_endpoint** ep = &c->endpoint; gpr_mu_unlock(&c->mu); + // In some implementations, the closure can be flushed before + // grpc_tcp_client_connect and since the closure requires access to c->mu, + // this can result in a deadlock. Refer + // https://github.com/grpc/grpc/issues/16427 + // grpc_tcp_client_connect would fill c->endpoint with proper contents and we + // make sure that we would still exist at that point by taking a ref. grpc_tcp_client_connect(closure, ep, args->interested_parties, args->channel_args, &addr, args->deadline); } |