clang-format

pull/6897/head
Craig Tiller 9 years ago
parent 8cdc4e5f8a
commit df30bc53b9
  1. 7
      src/core/ext/client_config/subchannel.c
  2. 6
      src/core/ext/resolver/dns/native/dns_resolver.c

@ -639,11 +639,12 @@ static void subchannel_connected(grpc_exec_ctx *exec_ctx, void *arg,
gpr_timespec time_til_next = gpr_time_sub(c->next_attempt, now); gpr_timespec time_til_next = gpr_time_sub(c->next_attempt, now);
const char *errmsg = grpc_error_string(error); const char *errmsg = grpc_error_string(error);
gpr_log(GPR_INFO, "Connect failed: %s", errmsg); gpr_log(GPR_INFO, "Connect failed: %s", errmsg);
if (gpr_time_cmp(time_til_next, gpr_time_0(time_til_next.clock_type)) <= 0) { if (gpr_time_cmp(time_til_next, gpr_time_0(time_til_next.clock_type)) <=
0) {
gpr_log(GPR_INFO, "Retry immediately"); gpr_log(GPR_INFO, "Retry immediately");
} else { } else {
gpr_log(GPR_INFO, "Retry in %d.%09d seconds", gpr_log(GPR_INFO, "Retry in %d.%09d seconds", time_til_next.tv_sec,
time_til_next.tv_sec, time_til_next.tv_nsec); time_til_next.tv_nsec);
} }
grpc_timer_init(exec_ctx, &c->alarm, c->next_attempt, on_alarm, c, now); grpc_timer_init(exec_ctx, &c->alarm, c->next_attempt, on_alarm, c, now);
grpc_error_free_string(errmsg); grpc_error_free_string(errmsg);

@ -189,14 +189,14 @@ static void dns_on_resolved(grpc_exec_ctx *exec_ctx, void *arg,
gpr_timespec next_try = gpr_backoff_step(&r->backoff_state, now); gpr_timespec next_try = gpr_backoff_step(&r->backoff_state, now);
gpr_timespec timeout = gpr_time_sub(next_try, now); gpr_timespec timeout = gpr_time_sub(next_try, now);
const char *msg = grpc_error_string(error); const char *msg = grpc_error_string(error);
gpr_log(GPR_DEBUG, "dns resolution failed: %s",msg); gpr_log(GPR_DEBUG, "dns resolution failed: %s", msg);
grpc_error_free_string(msg); grpc_error_free_string(msg);
GPR_ASSERT(!r->have_retry_timer); GPR_ASSERT(!r->have_retry_timer);
r->have_retry_timer = true; r->have_retry_timer = true;
GRPC_RESOLVER_REF(&r->base, "retry-timer"); GRPC_RESOLVER_REF(&r->base, "retry-timer");
if (gpr_time_cmp(timeout, gpr_time_0(timeout.clock_type)) <= 0) { if (gpr_time_cmp(timeout, gpr_time_0(timeout.clock_type)) <= 0) {
gpr_log(GPR_DEBUG, "retrying in %d.%09d seconds", gpr_log(GPR_DEBUG, "retrying in %d.%09d seconds", timeout.tv_sec,
timeout.tv_sec, timeout.tv_nsec); timeout.tv_nsec);
} else { } else {
gpr_log(GPR_DEBUG, "retrying immediately"); gpr_log(GPR_DEBUG, "retrying immediately");
} }

Loading…
Cancel
Save