mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
[ntcore] Fix overlapping subscriber handling (#6067)
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user