Add comments about the fix

pull/16979/head
Yash Tibrewal 6 years ago
parent 40d443de1b
commit cad9be0889
  1. 6
      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);
}

Loading…
Cancel
Save