From 6551b1ea8f2b8280ce31d5a634672f8e6c15dc5b Mon Sep 17 00:00:00 2001 From: Guillaume Sarthou Date: Wed, 26 Jun 2024 14:16:20 +0200 Subject: [PATCH] [OccasionsManager] automatic unsubscription --- src/core/Occasions/OccasionsManager.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/core/Occasions/OccasionsManager.cpp b/src/core/Occasions/OccasionsManager.cpp index c1cfcfd..381960f 100644 --- a/src/core/Occasions/OccasionsManager.cpp +++ b/src/core/Occasions/OccasionsManager.cpp @@ -54,6 +54,8 @@ namespace mementar { msg.id = (int)id; msg.data = triplet.toString(); msg.last = subscription_.isFinished(id); + if(msg.last) + subscription_.unsubscribe(id); pub_.publish(msg); } }