Add some additional delay when sending pings without there being activity on receive side

pull/22932/head
Yash Tibrewal 5 years ago
parent 506cf26b49
commit d7c3d06709
  1. 4
      src/core/ext/transport/chttp2/transport/writing.cc

@ -81,7 +81,9 @@ static void maybe_initiate_ping(grpc_chttp2_transport* t) {
(t->keepalive_permit_without_calls == 0 &&
grpc_chttp2_stream_map_size(&t->stream_map) == 0)
? 7200 * GPR_MS_PER_SEC
: t->ping_policy.min_sent_ping_interval_without_data;
: (t->ping_policy.min_sent_ping_interval_without_data +
GPR_MS_PER_SEC); /* A second is added to deal with network delays
and timing imprecision */
grpc_millis next_allowed_ping =
t->ping_state.last_ping_sent_time + next_allowed_ping_interval;

Loading…
Cancel
Save