aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar kpayson64 <kpayson@google.com>2017-12-01 17:39:02 -0800
committerGravatar GitHub <noreply@github.com>2017-12-01 17:39:02 -0800
commitd1945788c5ef92c3ed772da945e4f74a1681381a (patch)
treefb7723bcd6963290a12efdce95d762f00139da8c /src
parentf66cfed913e21667f852689f8b9e71a8b01c71c9 (diff)
parentdf86101267fe579048d7efc068c95eca52e0ca23 (diff)
Merge pull request #13599 from kpayson64/fix_flow_control_bug_local
Initialize last sent ping time
Diffstat (limited to 'src')
-rw-r--r--src/core/ext/transport/chttp2/transport/chttp2_transport.cc1
-rw-r--r--src/core/ext/transport/chttp2/transport/writing.cc8
2 files changed, 7 insertions, 2 deletions
diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.cc b/src/core/ext/transport/chttp2/transport/chttp2_transport.cc
index 01a16955d9..5a7830b0c0 100644
--- a/src/core/ext/transport/chttp2/transport/chttp2_transport.cc
+++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.cc
@@ -549,6 +549,7 @@ static void init_transport(grpc_exec_ctx* exec_ctx, grpc_chttp2_transport* t,
/* No pings allowed before receiving a header or data frame. */
t->ping_state.pings_before_data_required = 0;
t->ping_state.is_delayed_ping_timer_set = false;
+ t->ping_state.last_ping_sent_time = GRPC_MILLIS_INF_PAST;
t->ping_recv_state.last_ping_recv_time = GRPC_MILLIS_INF_PAST;
t->ping_recv_state.ping_strikes = 0;
diff --git a/src/core/ext/transport/chttp2/transport/writing.cc b/src/core/ext/transport/chttp2/transport/writing.cc
index 15869b8880..204b5a7708 100644
--- a/src/core/ext/transport/chttp2/transport/writing.cc
+++ b/src/core/ext/transport/chttp2/transport/writing.cc
@@ -81,8 +81,11 @@ static void maybe_initiate_ping(grpc_exec_ctx* exec_ctx,
/* not enough elapsed time between successive pings */
if (grpc_http_trace.enabled() || grpc_bdp_estimator_trace.enabled()) {
gpr_log(GPR_DEBUG,
- "%s: Ping delayed [%p]: not enough time elapsed since last ping",
- t->is_client ? "CLIENT" : "SERVER", t->peer_string);
+ "%s: Ping delayed [%p]: not enough time elapsed since last ping. "
+ " Last ping %f: Next ping %f: Now %f",
+ t->is_client ? "CLIENT" : "SERVER", t->peer_string,
+ (double)t->ping_state.last_ping_sent_time,
+ (double)next_allowed_ping, (double)now);
}
if (!t->ping_state.is_delayed_ping_timer_set) {
t->ping_state.is_delayed_ping_timer_set = true;
@@ -91,6 +94,7 @@ static void maybe_initiate_ping(grpc_exec_ctx* exec_ctx,
}
return;
}
+
pq->inflight_id = t->ping_ctr;
t->ping_ctr++;
GRPC_CLOSURE_LIST_SCHED(exec_ctx, &pq->lists[GRPC_CHTTP2_PCL_INITIATE]);