FIX: fixes spelling error in variablename participants_ (list of connected participants in the manager).

This commit is contained in:
Christina Sander 2022-08-30 12:43:42 +02:00
parent 92975e8349
commit 1ed68d302d
Signed by untrusted user: csander
GPG Key ID: 8A1F9FA7B3420089
2 changed files with 5 additions and 8 deletions

View File

@ -70,7 +70,7 @@
std::mutex mutexSchedulingParticipants_;
/// list of all participants connected
std::list<std::shared_ptr<EventManager::Participant>> particpants_;
std::list<std::shared_ptr<EventManager::Participant>> participants_;
/// mutex to protect participants_
std::mutex mutexParticipants_;

View File

@ -352,7 +352,7 @@
{
std::shared_ptr<EventManager::Participant> participant = connectionQueue_.front();
connectionQueue_.pop();
particpants_.push_back(participant);
participants_.push_back(participant);
participant->init();
@ -375,20 +375,17 @@
void EventManager::Manager::disconnect(std::shared_ptr<EventManager::Participant> participant)
{
disconnect(participant);
std::lock_guard<std::mutex> guard(mutexParticipants_);
std::list<std::shared_ptr<EventManager::Participant>>::iterator it;
it = std::find(particpants_.begin(), particpants_.end(),participant);
it = std::find(participants_.begin(), participants_.end(),participant);
if (it != particpants_.end())
if (it != participants_.end())
{
particpants_.erase(it);
participants_.erase(it);
}
participant->setManager(nullptr);
}