2
0
mirror of https://github.com/m-labs/artiq.git synced 2024-12-26 11:48:27 +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() await self._reconnect_event.wait()
self._reconnect_event.clear() self._reconnect_event.clear()
try: try:
await self.reconnect_cr() await asyncio.wait_for(self.reconnect_cr(), timeout=5)
except asyncio.CancelledError:
raise
except: except:
await asyncio.sleep(5) await asyncio.sleep(5)
self._reconnect_event.set() self._reconnect_event.set()