fixed leak and outdated comment

pull/11591/head
David Garcia Quintas 8 years ago
parent 64ea30fe5b
commit bc6bc090f4
  1. 9
      src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.c

@ -405,7 +405,7 @@ static grpc_connectivity_state update_lb_connectivity_status_locked(
* CHECK: sd->curr_connectivity_state == CONNECTING. * CHECK: sd->curr_connectivity_state == CONNECTING.
* *
* 3) RULE: ALL subchannels are SHUTDOWN => policy is SHUTDOWN. * 3) RULE: ALL subchannels are SHUTDOWN => policy is SHUTDOWN.
* CHECK: p->num_subchannels = 0. * CHECK: p->num_shutdown == p->num_subchannels.
* *
* 4) RULE: ALL subchannels are TRANSIENT_FAILURE => policy is * 4) RULE: ALL subchannels are TRANSIENT_FAILURE => policy is
* TRANSIENT_FAILURE. * TRANSIENT_FAILURE.
@ -427,14 +427,13 @@ static grpc_connectivity_state update_lb_connectivity_status_locked(
return GRPC_CHANNEL_CONNECTING; return GRPC_CHANNEL_CONNECTING;
} else if (p->num_shutdown == p->num_subchannels) { /* 3) SHUTDOWN */ } else if (p->num_shutdown == p->num_subchannels) { /* 3) SHUTDOWN */
grpc_connectivity_state_set(exec_ctx, &p->state_tracker, grpc_connectivity_state_set(exec_ctx, &p->state_tracker,
GRPC_CHANNEL_SHUTDOWN, GRPC_ERROR_REF(error), GRPC_CHANNEL_SHUTDOWN, error, "rr_shutdown");
"rr_shutdown");
return GRPC_CHANNEL_SHUTDOWN; return GRPC_CHANNEL_SHUTDOWN;
} else if (p->num_transient_failures == } else if (p->num_transient_failures ==
p->num_subchannels) { /* 4) TRANSIENT_FAILURE */ p->num_subchannels) { /* 4) TRANSIENT_FAILURE */
grpc_connectivity_state_set(exec_ctx, &p->state_tracker, grpc_connectivity_state_set(exec_ctx, &p->state_tracker,
GRPC_CHANNEL_TRANSIENT_FAILURE, GRPC_CHANNEL_TRANSIENT_FAILURE, error,
GRPC_ERROR_REF(error), "rr_transient_failure"); "rr_transient_failure");
return GRPC_CHANNEL_TRANSIENT_FAILURE; return GRPC_CHANNEL_TRANSIENT_FAILURE;
} else if (p->num_idle == p->num_subchannels) { /* 5) IDLE */ } else if (p->num_idle == p->num_subchannels) { /* 5) IDLE */
grpc_connectivity_state_set(exec_ctx, &p->state_tracker, GRPC_CHANNEL_IDLE, grpc_connectivity_state_set(exec_ctx, &p->state_tracker, GRPC_CHANNEL_IDLE,

Loading…
Cancel
Save