Merge pull request #14780 from muxi/fix-keepalive

Keepalive watchdog timer used a wrong timeout value
pull/14810/head
Muxi Yan 7 years ago committed by GitHub
commit 9e4d954077
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/core/ext/transport/chttp2/transport/chttp2_transport.cc
  2. 2
      test/core/end2end/tests/keepalive_timeout.cc

@ -2630,7 +2630,7 @@ static void start_keepalive_ping_locked(void* arg, grpc_error* error) {
grpc_chttp2_transport* t = static_cast<grpc_chttp2_transport*>(arg);
GRPC_CHTTP2_REF_TRANSPORT(t, "keepalive watchdog");
grpc_timer_init(&t->keepalive_watchdog_timer,
grpc_core::ExecCtx::Get()->Now() + t->keepalive_time,
grpc_core::ExecCtx::Get()->Now() + t->keepalive_timeout,
&t->keepalive_watchdog_fired_locked);
}

@ -102,7 +102,7 @@ static void test_keepalive_timeout(grpc_end2end_test_config config) {
grpc_arg keepalive_arg_elems[3];
keepalive_arg_elems[0].type = GRPC_ARG_INTEGER;
keepalive_arg_elems[0].key = const_cast<char*>(GRPC_ARG_KEEPALIVE_TIME_MS);
keepalive_arg_elems[0].value.integer = 1500;
keepalive_arg_elems[0].value.integer = 3500;
keepalive_arg_elems[1].type = GRPC_ARG_INTEGER;
keepalive_arg_elems[1].key = const_cast<char*>(GRPC_ARG_KEEPALIVE_TIMEOUT_MS);
keepalive_arg_elems[1].value.integer = 0;

Loading…
Cancel
Save