|
|
@ -71,13 +71,6 @@ const auto kMaxConnectionAgeJitter = 0.1; |
|
|
|
|
|
|
|
|
|
|
|
} // namespace
|
|
|
|
} // namespace
|
|
|
|
|
|
|
|
|
|
|
|
#define GRPC_IDLE_FILTER_LOG(format, ...) \ |
|
|
|
|
|
|
|
do { \
|
|
|
|
|
|
|
|
if (GRPC_TRACE_FLAG_ENABLED(client_idle_filter)) { \
|
|
|
|
|
|
|
|
gpr_log(GPR_INFO, "(client idle filter) " format, ##__VA_ARGS__); \
|
|
|
|
|
|
|
|
} \
|
|
|
|
|
|
|
|
} while (0) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Duration GetClientIdleTimeout(const ChannelArgs& args) { |
|
|
|
Duration GetClientIdleTimeout(const ChannelArgs& args) { |
|
|
|
return args.GetDurationFromIntMillis(GRPC_ARG_CLIENT_IDLE_TIMEOUT_MS) |
|
|
|
return args.GetDurationFromIntMillis(GRPC_ARG_CLIENT_IDLE_TIMEOUT_MS) |
|
|
|
.value_or(kDefaultIdleTimeout); |
|
|
|
.value_or(kDefaultIdleTimeout); |
|
|
@ -259,7 +252,8 @@ void LegacyChannelIdleFilter::DecreaseCallCount() { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void LegacyChannelIdleFilter::StartIdleTimer() { |
|
|
|
void LegacyChannelIdleFilter::StartIdleTimer() { |
|
|
|
GRPC_IDLE_FILTER_LOG("timer has started"); |
|
|
|
GRPC_TRACE_LOG(client_idle_filter, INFO) |
|
|
|
|
|
|
|
<< "(client idle filter) timer has started"; |
|
|
|
auto idle_filter_state = idle_filter_state_; |
|
|
|
auto idle_filter_state = idle_filter_state_; |
|
|
|
// Hold a ref to the channel stack for the timer callback.
|
|
|
|
// Hold a ref to the channel stack for the timer callback.
|
|
|
|
auto channel_stack = channel_stack_->Ref(); |
|
|
|
auto channel_stack = channel_stack_->Ref(); |
|
|
|