diff --git a/examples/connext_dds/remote_procedure_call/py/inventory_client.py b/examples/connext_dds/remote_procedure_call/py/inventory_client.py index 78ec9611c..26c416d99 100644 --- a/examples/connext_dds/remote_procedure_call/py/inventory_client.py +++ b/examples/connext_dds/remote_procedure_call/py/inventory_client.py @@ -21,21 +21,13 @@ class InventoryClient(InventoryService, rpc.ClientBase): ... -async def wait_for_service(client: InventoryClient): - while client.matched_service_count == 0: - await sleep(0.1) - - async def run_client(args): participant = dds.DomainParticipant(args.domain) client = InventoryClient( participant, "Inventory", max_wait_per_call=dds.Duration(20) ) - # For versions 7.4.0 and below: - await wait_for_service(client) - # For newer versions you can use the following: - # await client.wait_for_service_async(dds.Duration(20)) + await client.wait_for_service_async(dds.Duration(20)) print("Initial inventory: ", await client.get_inventory()) diff --git a/tutorials/rpc/py/robot_client.py b/tutorials/rpc/py/robot_client.py index b3452faa9..b80451772 100644 --- a/tutorials/rpc/py/robot_client.py +++ b/tutorials/rpc/py/robot_client.py @@ -24,10 +24,7 @@ async def main(): participant = dds.DomainParticipant(domain_id=0) client = RobotControlClient(participant, "MyRobotControl") - # For versions 7.4.0 and below: - sleep(2) - # For newer versions you can use the following: - # await client.wait_for_service_async(dds.Duration(20)) + await client.wait_for_service_async(dds.Duration(20)) # Available in Connext 7.5.0+ print("Calling walk_to...") result = await client.walk_to(