Skip to content

Commit 7b4f8f8

Browse files
authored
Do not override the timeout of the operational node discovery (#458)
1 parent 60a8544 commit 7b4f8f8

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

matter_server/server/device_controller.py

+8-6
Original file line numberDiff line numberDiff line change
@@ -932,15 +932,17 @@ async def _resolve_node(
932932
# the sdk crashes when multiple resolves happen at the same time
933933
# guard simultane resolves with a lock.
934934
async with node_lock, self._resolve_lock:
935-
LOGGER.debug("Attempting to resolve node %s...", node_id)
935+
LOGGER.debug(
936+
"Attempting to resolve node %s... (attempt %s of %s)",
937+
node_id,
938+
attempt,
939+
retries,
940+
)
936941
await self._call_sdk(
937942
self.chip_controller.GetConnectedDeviceSync,
938-
allowPASE=False,
939-
# For the first attempts we use the SDK's default timeout.
940-
# Once we keep retrying we try the final attempt(s)
941-
# with an extended timeout.
942-
timeoutMs=30000 if attempt >= 3 else None,
943943
nodeid=node_id,
944+
allowPASE=False,
945+
timeoutMs=None,
944946
)
945947
except (ChipStackError, TimeoutError) as err:
946948
if attempt >= retries:

0 commit comments

Comments
 (0)