Skip to content

Commit

Permalink
Fix custom attribute polling due to redundant lock (#722)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelveldt authored May 29, 2024
1 parent 431d369 commit cbf3a7a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions matter_server/server/device_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -1400,11 +1400,11 @@ def run_fallback_node_scanner() -> None:

async def _custom_attributes_poller(self) -> None:
"""Poll custom clusters/attributes for changes."""
for node_id, polled_attributes in self._polled_attributes.items():
for node_id in tuple(self._polled_attributes):
node = self._nodes[node_id]
if not node.available:
continue
for attribute_path in polled_attributes:
for attribute_path in self._polled_attributes[node_id].copy():
try:
# try to read the attribute(s) - this will fire an event if the value changed
await self.read_attribute(
Expand Down

0 comments on commit cbf3a7a

Please sign in to comment.