diff options
author | Craig Tiller <ctiller@google.com> | 2017-10-11 08:55:53 -0700 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2017-10-11 08:55:53 -0700 |
commit | c9f987426daff98d47aca3d8d2753a16de0ba520 (patch) | |
tree | 155d9a38bc1d612e951c5dfe8f1076776106caf5 /src/core | |
parent | 5d38ac60b84dfebc20d142501e8b55e3154c8d65 (diff) | |
parent | e94374d0a5a3040ca71392be4c61b17f6ef99030 (diff) |
Merge branch 'timer' into pid++
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/ext/transport/chttp2/transport/chttp2_transport.cc | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.cc b/src/core/ext/transport/chttp2/transport/chttp2_transport.cc index f6f9242caf..fbd3c328a0 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.cc +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.cc @@ -571,6 +571,7 @@ static void init_transport(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, t->keepalive_state = GRPC_CHTTP2_KEEPALIVE_STATE_DISABLED; } + GRPC_CHTTP2_REF_TRANSPORT(t, "bdp_ping"); schedule_bdp_ping_locked(exec_ctx, t); grpc_chttp2_act_on_flowctl_action( @@ -2568,7 +2569,6 @@ static void read_action_locked(grpc_exec_ctx *exec_ctx, void *tp, static void schedule_bdp_ping_locked(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t) { - GRPC_CHTTP2_REF_TRANSPORT(t, "bdp_ping"); t->flow_control.bdp_estimator->SchedulePing(); send_ping_locked(exec_ctx, t, &t->start_bdp_ping_locked, &t->finish_bdp_ping_locked); @@ -2578,7 +2578,8 @@ static void start_bdp_ping_locked(grpc_exec_ctx *exec_ctx, void *tp, grpc_error *error) { grpc_chttp2_transport *t = (grpc_chttp2_transport *)tp; if (GRPC_TRACER_ON(grpc_http_trace)) { - gpr_log(GPR_DEBUG, "%s: Start BDP ping", t->peer_string); + gpr_log(GPR_DEBUG, "%s: Start BDP ping err=%s", t->peer_string, + grpc_error_string(error)); } /* Reset the keepalive ping timer */ if (t->keepalive_state == GRPC_CHTTP2_KEEPALIVE_STATE_WAITING) { @@ -2591,9 +2592,10 @@ static void finish_bdp_ping_locked(grpc_exec_ctx *exec_ctx, void *tp, grpc_error *error) { grpc_chttp2_transport *t = (grpc_chttp2_transport *)tp; if (GRPC_TRACER_ON(grpc_http_trace)) { - gpr_log(GPR_DEBUG, "%s: Complete BDP ping", t->peer_string); + gpr_log(GPR_DEBUG, "%s: Complete BDP ping err=%s", t->peer_string, + grpc_error_string(error)); } - if (error == GRPC_ERROR_CANCELLED) { + if (error != GRPC_ERROR_NONE) { GRPC_CHTTP2_UNREF_TRANSPORT(exec_ctx, t, "bdp_ping"); return; } @@ -2609,7 +2611,7 @@ static void next_bdp_ping_timer_expired_locked(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t = (grpc_chttp2_transport *)tp; GPR_ASSERT(t->have_next_bdp_ping_timer); t->have_next_bdp_ping_timer = false; - if (error == GRPC_ERROR_CANCELLED) { + if (error != GRPC_ERROR_NONE) { GRPC_CHTTP2_UNREF_TRANSPORT(exec_ctx, t, "bdp_ping"); return; } |