forked from M-Labs/artiq
1
0
Fork 0

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
1 changed files with 3 additions and 1 deletions

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()