From b694a4140d97a676227854277158125369eb6932 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Mon, 21 Aug 2023 17:10:07 +0000 Subject: [PATCH] fix comparison bug --- src/core/ext/xds/xds_listener.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/core/ext/xds/xds_listener.h b/src/core/ext/xds/xds_listener.h index a791e3fe55c67..cb6cb06f518a8 100644 --- a/src/core/ext/xds/xds_listener.h +++ b/src/core/ext/xds/xds_listener.h @@ -76,9 +76,10 @@ struct XdsListenerResource : public XdsResourceType::ResourceData { } else { auto& rc1 = absl::get>( route_config); - auto& rc2 = absl::get>( - other.route_config); - if (!(*rc1 == *rc2)) return false; + auto* rc2 = absl::get_if>( + &other.route_config); + if (rc2 == nullptr) return false; + if (!(*rc1 == **rc2)) return false; } return http_max_stream_duration == other.http_max_stream_duration && http_filters == other.http_filters;