Skip to content

Commit

Permalink
fixup: only read for current call.
Browse files Browse the repository at this point in the history
  • Loading branch information
eugeneo committed Dec 26, 2023
1 parent ecbe3fd commit 7751d4f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/ext/xds/xds_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1420,11 +1420,11 @@ void XdsClient::ChannelState::LrsCallState::OnRequestSent(bool /*ok*/) {
void XdsClient::ChannelState::LrsCallState::OnRecvMessage(
absl::string_view payload) {
MutexLock lock(&xds_client()->mu_);
// If we're no longer the current call, ignore the result.
if (!IsCurrentCallOnChannel()) return;
// Start recv after any code branch
auto cleanup =
absl::MakeCleanup([call = call_.get()]() { call->StartRecvMessage(); });
// If we're no longer the current call, ignore the result.
if (!IsCurrentCallOnChannel()) return;
// Parse the response.
bool send_all_clusters = false;
std::set<std::string> new_cluster_names;
Expand Down

0 comments on commit 7751d4f

Please sign in to comment.