From 97166494e7e1d389b8b8892f7ab12b450240e18d Mon Sep 17 00:00:00 2001 From: Andreas Linde Date: Sun, 31 Dec 2023 23:14:37 +0100 Subject: [PATCH] Also remove bindings for a removed entity --- spine/nodemanagement_defaileddiscovery.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/spine/nodemanagement_defaileddiscovery.go b/spine/nodemanagement_defaileddiscovery.go index ce3f61e0..c9395945 100644 --- a/spine/nodemanagement_defaileddiscovery.go +++ b/spine/nodemanagement_defaileddiscovery.go @@ -193,12 +193,16 @@ func (r *NodeManagementImpl) processNotifyDetailedDiscoveryData(message *Message } Events.Publish(payload) - subscriptionMgr := r.Device().SubscriptionManager() // remove all subscriptions for this entity + subscriptionMgr := r.Device().SubscriptionManager() subscriptionMgr.RemoveSubscriptionsForEntity(removedEntity) // make sure Heartbeat Manager is up to date r.Device().HeartbeatManager().UpdateHeartbeatOnSubscriptions() + + // remove all bindings for this entity + bindingMgr := r.Device().BindingManager() + bindingMgr.RemoveBindingsForEntity(removedEntity) } }