Skip to content

Commit

Permalink
prevent subscriptions of non existing nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelveldt committed Jun 27, 2023
1 parent 87da481 commit 6818b52
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion matter_server/server/device_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ async def _subscribe_node(self, node_id: int) -> None:
if self.chip_controller is None:
raise RuntimeError("Device Controller not initialized.")

if node_id not in self._nodes:
if self._nodes.get(node_id) is None:
raise NodeNotExists(
f"Node {node_id} does not exist or has not been interviewed."
)
Expand Down

0 comments on commit 6818b52

Please sign in to comment.