summaryrefslogtreecommitdiff
path: root/include/CommonAPI/Event.hpp
diff options
context:
space:
mode:
authorJuergen Gehring <juergen.gehring@bmw.de>2018-01-25 01:01:22 -0800
committerJuergen Gehring <juergen.gehring@bmw.de>2018-01-25 01:01:22 -0800
commit2fd0625d21f1fa8e6a3adfc89ce9f381a4d33990 (patch)
tree373a6c991944c700ee3ff1fe872daa3f751281d8 /include/CommonAPI/Event.hpp
parent2c259a9cbfa8fbde71ebc62d45684c375311f4fc (diff)
downloadgenivi-common-api-runtime-2fd0625d21f1fa8e6a3adfc89ce9f381a4d33990.tar.gz
capicxx-core-runtime 3.1.12.43.1.12.4
Diffstat (limited to 'include/CommonAPI/Event.hpp')
-rw-r--r--include/CommonAPI/Event.hpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/CommonAPI/Event.hpp b/include/CommonAPI/Event.hpp
index 67cc6dc..ab656f8 100644
--- a/include/CommonAPI/Event.hpp
+++ b/include/CommonAPI/Event.hpp
@@ -115,8 +115,11 @@ typename Event<Arguments_...>::Subscription Event<Arguments_...>::subscribe(List
pendingSubscriptions_[subscription] = std::move(listeners);
subscriptionMutex_.unlock();
- if (isFirstListener)
+ if (isFirstListener) {
+ if (!pendingUnsubscriptions_.empty())
+ onLastListenerRemoved(listener);
onFirstListenerAdded(listener);
+ }
onListenerAdded(listener, subscription);
return subscription;