diff options
author | Craig Tiller <craig.tiller@gmail.com> | 2016-06-01 15:23:37 -0700 |
---|---|---|
committer | Craig Tiller <craig.tiller@gmail.com> | 2016-06-01 15:23:37 -0700 |
commit | 392a7805960ae4131591efedc0c9cf15542e29c3 (patch) | |
tree | 3748d721d197e20ed069c46780eb4da08f1120c8 | |
parent | 19fbe93787ea018572d0cdc80d9402ce866020f7 (diff) | |
parent | df30bc53b93a5d97678572d96bb8cee1ead99c34 (diff) |
Merge branch 'error' of https://github.com/ctiller/grpc into error
-rw-r--r-- | src/core/ext/client_config/subchannel.c | 7 | ||||
-rw-r--r-- | src/core/ext/resolver/dns/native/dns_resolver.c | 6 |
2 files changed, 7 insertions, 6 deletions
diff --git a/src/core/ext/client_config/subchannel.c b/src/core/ext/client_config/subchannel.c index 290cac8a43..ce54ebda9f 100644 --- a/src/core/ext/client_config/subchannel.c +++ b/src/core/ext/client_config/subchannel.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); const char *errmsg = grpc_error_string(error); 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"); } else { - gpr_log(GPR_INFO, "Retry in %d.%09d seconds", - time_til_next.tv_sec, time_til_next.tv_nsec); + gpr_log(GPR_INFO, "Retry in %d.%09d seconds", time_til_next.tv_sec, + time_til_next.tv_nsec); } grpc_timer_init(exec_ctx, &c->alarm, c->next_attempt, on_alarm, c, now); grpc_error_free_string(errmsg); diff --git a/src/core/ext/resolver/dns/native/dns_resolver.c b/src/core/ext/resolver/dns/native/dns_resolver.c index eb6af26cfa..71e20eef10 100644 --- a/src/core/ext/resolver/dns/native/dns_resolver.c +++ b/src/core/ext/resolver/dns/native/dns_resolver.c @@ -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 timeout = gpr_time_sub(next_try, now); 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); GPR_ASSERT(!r->have_retry_timer); r->have_retry_timer = true; GRPC_RESOLVER_REF(&r->base, "retry-timer"); if (gpr_time_cmp(timeout, gpr_time_0(timeout.clock_type)) <= 0) { - gpr_log(GPR_DEBUG, "retrying in %d.%09d seconds", - timeout.tv_sec, timeout.tv_nsec); + gpr_log(GPR_DEBUG, "retrying in %d.%09d seconds", timeout.tv_sec, + timeout.tv_nsec); } else { gpr_log(GPR_DEBUG, "retrying immediately"); } |