Polish comment

pull/15069/head
Muxi Yan 7 years ago
parent 2111cc0a8e
commit 72f7159546
  1. 4
      src/core/lib/iomgr/tcp_client_cfstream.cc

@ -89,7 +89,7 @@ static void OnAlarm(void* arg, grpc_error* error) {
connect->closure = nil;
const bool done = (--connect->refs == 0);
gpr_mu_unlock(&connect->mu);
// Only schedule a callback once, by either on_timer or on_connected. The
// Only schedule a callback once, by either OnAlarm or OnOpen. The
// first one issues callback while the second one does cleanup.
if (done) {
CFStreamConnectCleanup(connect);
@ -113,6 +113,8 @@ static void OnOpen(void* arg, grpc_error* error) {
bool done = (--connect->refs == 0);
grpc_endpoint** endpoint = connect->endpoint;
// Only schedule a callback once, by either OnAlarm or OnOpen. The
// first one issues callback while the second one does cleanup.
if (done) {
gpr_mu_unlock(&connect->mu);
CFStreamConnectCleanup(connect);

Loading…
Cancel
Save