forked from M-Labs/artiq
moninj: remove CancelledError workaround
This commit is contained in:
parent
e56331248e
commit
27178c1478
|
@ -94,9 +94,7 @@ class CommMonInj:
|
||||||
self.injection_status_cb(channel, override, value)
|
self.injection_status_cb(channel, override, value)
|
||||||
else:
|
else:
|
||||||
raise ValueError("Unknown packet type", ty)
|
raise ValueError("Unknown packet type", ty)
|
||||||
except asyncio.CancelledError:
|
except Exception:
|
||||||
raise
|
|
||||||
except:
|
|
||||||
logger.error("Moninj connection terminating with exception", exc_info=True)
|
logger.error("Moninj connection terminating with exception", exc_info=True)
|
||||||
finally:
|
finally:
|
||||||
if self.disconnect_cb is not None:
|
if self.disconnect_cb is not None:
|
||||||
|
|
|
@ -719,10 +719,7 @@ class _DeviceManager:
|
||||||
self.disconnect_cb)
|
self.disconnect_cb)
|
||||||
try:
|
try:
|
||||||
await new_mi_connection.connect(self.mi_addr, self.mi_port)
|
await new_mi_connection.connect(self.mi_addr, self.mi_port)
|
||||||
except asyncio.CancelledError:
|
except Exception:
|
||||||
logger.info("cancelled connection to moninj")
|
|
||||||
break
|
|
||||||
except:
|
|
||||||
logger.error("failed to connect to moninj. Is aqctl_moninj_proxy running?", exc_info=True)
|
logger.error("failed to connect to moninj. Is aqctl_moninj_proxy running?", exc_info=True)
|
||||||
await asyncio.sleep(10.)
|
await asyncio.sleep(10.)
|
||||||
self.reconnect_mi.set()
|
self.reconnect_mi.set()
|
||||||
|
|
Loading…
Reference in New Issue