diff options
author | Vishal Powar <vishal.powar@gmail.com> | 2018-11-20 15:52:45 -0800 |
---|---|---|
committer | Vishal Powar <vishal.powar@gmail.com> | 2018-11-20 15:52:45 -0800 |
commit | c575d687301a1ffd225445be70243e7b8bc0ac49 (patch) | |
tree | 913a28abfd0cb9a4c7861775808eb954e28bf7db /src/core/ext/filters | |
parent | 070d52435208b3fe7bf74963d7f17ab309ca82e2 (diff) |
Incorporate review comments
Diffstat (limited to 'src/core/ext/filters')
-rw-r--r-- | src/core/ext/filters/client_channel/lb_policy/xds/xds.cc | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/src/core/ext/filters/client_channel/lb_policy/xds/xds.cc b/src/core/ext/filters/client_channel/lb_policy/xds/xds.cc index e4b29a0d93..89b86b38a6 100644 --- a/src/core/ext/filters/client_channel/lb_policy/xds/xds.cc +++ b/src/core/ext/filters/client_channel/lb_policy/xds/xds.cc @@ -199,7 +199,6 @@ class XdsLb : public LoadBalancingPolicy { static bool LoadReportCountersAreZero(xds_grpclb_request* request); static void MaybeSendClientLoadReportLocked(void* arg, grpc_error* error); - static void ClientLoadReportDoneLocked(void* arg, grpc_error* error); static void OnInitialRequestSentLocked(void* arg, grpc_error* error); static void OnBalancerMessageReceivedLocked(void* arg, grpc_error* error); static void OnBalancerStatusReceivedLocked(void* arg, grpc_error* error); @@ -674,11 +673,11 @@ void XdsLb::BalancerCallState::SendClientLoadReportLocked() { GPR_ASSERT(send_message_payload_ == nullptr); xds_grpclb_request* request = xds_grpclb_load_report_request_create_locked(client_stats_.get()); - // Skip client load report if the counters were all zero in the last // report and they are still zero in this one. if (LoadReportCountersAreZero(request)) { if (last_client_load_report_counters_were_zero_) { + xds_grpclb_request_destroy(request); ScheduleNextClientLoadReportLocked(); return; } @@ -690,19 +689,6 @@ void XdsLb::BalancerCallState::SendClientLoadReportLocked() { xds_grpclb_request_destroy(request); } -void XdsLb::BalancerCallState::ClientLoadReportDoneLocked(void* arg, - grpc_error* error) { - BalancerCallState* lb_calld = static_cast<BalancerCallState*>(arg); - XdsLb* xdslb_policy = lb_calld->xdslb_policy(); - grpc_byte_buffer_destroy(lb_calld->send_message_payload_); - lb_calld->send_message_payload_ = nullptr; - if (error != GRPC_ERROR_NONE || lb_calld != xdslb_policy->lb_calld_.get()) { - lb_calld->Unref(DEBUG_LOCATION, "client_load_report"); - return; - } - lb_calld->ScheduleNextClientLoadReportLocked(); -} - void XdsLb::BalancerCallState::OnInitialRequestSentLocked(void* arg, grpc_error* error) { BalancerCallState* lb_calld = static_cast<BalancerCallState*>(arg); |