Skip to content

Commit

Permalink
Make devices connect with a timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
callumforrester committed Oct 25, 2023
1 parent d80eca0 commit 22e2914
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/blueapi/core/context.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import asyncio
import functools
import logging
from dataclasses import dataclass, field
Expand Down Expand Up @@ -114,7 +115,7 @@ async def connect_devices(self, sim: bool = False) -> None:
coros[device_name] = device.connect(sim)

if len(coros) > 0:
await wait_for_connection(**coros)
await asyncio.wait(wait_for_connection(**coros), timeout=30.0)

def with_plan_module(self, module: ModuleType) -> None:
"""
Expand Down

0 comments on commit 22e2914

Please sign in to comment.