2
0
mirror of https://github.com/m-labs/artiq.git synced 2024-12-26 03:38:25 +08:00

waveform: add timeout to reconnect_cr

This commit is contained in:
Simon Renblad 2024-02-14 17:12:27 +08:00 committed by Sébastien Bourdeauducq
parent d085c1e4a4
commit 21b77567f2

View File

@ -50,7 +50,9 @@ class _BaseProxyClient:
await self._reconnect_event.wait()
self._reconnect_event.clear()
try:
await self.reconnect_cr()
await asyncio.wait_for(self.reconnect_cr(), timeout=5)
except asyncio.CancelledError:
raise
except:
await asyncio.sleep(5)
self._reconnect_event.set()