Skip to content

Commit

Permalink
add semaphore for concurrent node setups
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelveldt committed Mar 1, 2024
1 parent a7e1ad0 commit 6834357
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions matter_server/server/device_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -591,12 +591,13 @@ async def read_attribute(
if TYPE_CHECKING:
assert self.server.loop
assert self.chip_controller
loop = self.server.loop
future = loop.create_future()

future = self.server.loop.create_future()
device = await self._resolve_node(node_id)
Attribute.Read(
future=future,
eventLoop=loop,
device=device,
eventLoop=self.server.loop,
device=device.deviceProxy,
devCtrl=self.chip_controller,
attributes=[
Attribute.AttributePath(
Expand All @@ -607,7 +608,6 @@ async def read_attribute(
],
fabricFiltered=fabric_filtered,
).raise_on_error()

result: Attribute.AsyncReadTransaction.ReadResponse = await future
read_atributes = parse_attributes_from_read_result(result.tlvAttributes)
# update cached info in node attributes
Expand Down

0 comments on commit 6834357

Please sign in to comment.