Skip to content

Commit 80aedc1

Browse files
Bill Gallaghermattklein123
authored andcommitted
config: minor cleanup: remove DeltaSubscriptionState::resource_names_ (#8918)
Signed-off-by: Bill Gallagher <[email protected]>
1 parent df3fa24 commit 80aedc1

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

source/common/config/delta_subscription_state.cc

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ void DeltaSubscriptionState::handleGoodResponse(
105105
// initial_resource_versions messages, but will remind us to explicitly tell the server "I'm
106106
// cancelling my subscription" when we lose interest.
107107
for (const auto& resource_name : message.removed_resources()) {
108-
if (resource_names_.find(resource_name) != resource_names_.end()) {
108+
if (resource_versions_.find(resource_name) != resource_versions_.end()) {
109109
setResourceWaitingForServer(resource_name);
110110
}
111111
}
@@ -175,17 +175,14 @@ void* DeltaSubscriptionState::getNextRequestWithAck(const UpdateAck& ack) {
175175
void DeltaSubscriptionState::setResourceVersion(const std::string& resource_name,
176176
const std::string& resource_version) {
177177
resource_versions_[resource_name] = ResourceVersion(resource_version);
178-
resource_names_.insert(resource_name);
179178
}
180179

181180
void DeltaSubscriptionState::setResourceWaitingForServer(const std::string& resource_name) {
182181
resource_versions_[resource_name] = ResourceVersion();
183-
resource_names_.insert(resource_name);
184182
}
185183

186184
void DeltaSubscriptionState::setLostInterestInResource(const std::string& resource_name) {
187185
resource_versions_.erase(resource_name);
188-
resource_names_.erase(resource_name);
189186
}
190187

191188
} // namespace Config

0 commit comments

Comments
 (0)