FIX: unsubscribe participant from all events on disconnect

This commit is contained in:
Dominik Meyer 2023-07-03 12:35:53 +02:00
parent 38c69d8da1
commit 7a1f5b4ae1
No known key found for this signature in database
GPG Key ID: B4C312B600606B64

View File

@ -383,6 +383,9 @@ void EventManager::Manager::processDisconnect_( std::shared_ptr<EventManager::Pa
// before the participant gets disconnected it has to be unscheduled
processDisableScheduling_( participant );
// unsubscribe plugin from all events
unsubscribe(participant);
std::lock_guard<std::mutex> guard(mutexParticipants_);
auto it = std::find( participants_.begin(), participants_.end(), participant );
if( it != participants_.end() )