Skip to content

Commit

Permalink
Also remove bindings for a removed entity
Browse files Browse the repository at this point in the history
  • Loading branch information
DerAndereAndi committed Dec 31, 2023
1 parent 50a4423 commit 9716649
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion spine/nodemanagement_defaileddiscovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

Expand Down

0 comments on commit 9716649

Please sign in to comment.