Do not start timer if transport is closed.

pull/15978/head
yang-g 6 years ago
parent 4ba4d18960
commit acb863ca31
  1. 3
      src/core/ext/transport/chttp2/transport/chttp2_transport.cc

@ -2663,6 +2663,9 @@ static void init_keepalive_ping_locked(void* arg, grpc_error* error) {
static void start_keepalive_ping_locked(void* arg, grpc_error* error) {
grpc_chttp2_transport* t = static_cast<grpc_chttp2_transport*>(arg);
if (error != GRPC_ERROR_NONE) {
return;
}
GRPC_CHTTP2_REF_TRANSPORT(t, "keepalive watchdog");
grpc_timer_init(&t->keepalive_watchdog_timer,
grpc_core::ExecCtx::Get()->Now() + t->keepalive_timeout,

Loading…
Cancel
Save