Skip to content

Commit df6f5a7

Browse files
committed
Merge commit '1901579f1de2a7d51d040bcbb06838e105bbd90d' into feat/execution-speed-override
2 parents 57a392e + 1901579 commit df6f5a7

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

‎parol6/client/async_client.py‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -909,7 +909,13 @@ async def io(self, *, timeout: float | None = None) -> list[int] | None:
909909
isinstance(timeout, bool) or not math.isfinite(timeout) or timeout <= 0
910910
):
911911
raise ValueError("I/O timeout must be positive and finite")
912-
resp = await self._request(IOCmd(), timeout=timeout)
912+
# The outer deadline also bounds endpoint setup and its retries on an
913+
# absent peer; the inner one keeps the query to a single attempt.
914+
try:
915+
async with asyncio.timeout(timeout):
916+
resp = await self._request(IOCmd(), timeout=timeout)
917+
except TimeoutError:
918+
return None
913919
return resp.io if isinstance(resp, IOResultStruct) else None
914920

915921
async def joint_speeds(self) -> list[float] | None:

0 commit comments

Comments
 (0)