[ntcore] Fix overlapping subscriber handling (#6067)

This commit is contained in:
Peter Johnson
2023-12-19 22:37:16 -08:00
committed by GitHub
parent f02984159f
commit 3d201c71f7

View File

@@ -1708,7 +1708,9 @@ ServerImpl::TopicData* ServerImpl::CreateTopic(ClientData* client,
auto& tcd = topic->clients[aClient.get()];
bool added = false;
for (auto subscriber : subscribers) {
added = added || tcd.AddSubscriber(subscriber);
if (tcd.AddSubscriber(subscriber)) {
added = true;
}
}
if (added) {
aClient->UpdatePeriod(tcd, topic);