Jc2k / aiohomekit

asyncio for homekit
Apache License 2.0
52 stars 20 forks source link

Handle waiter already done in zeroconf service info #374

Closed bdraco closed 3 months ago

bdraco commented 3 months ago

fixes

Apr 28 12:25:23 homeassistant homeassistant[557]: 2024-04-28 07:25:23.034 ERROR (MainThread) [homeassistant] Error doing job: Exception in callback ZeroconfController._async_resolve_later(MSS425F-15cc...p._tcp.local., AsyncServiceI...ce_index=None))
Apr 28 12:25:23 homeassistant homeassistant[557]: Traceback (most recent call last):
Apr 28 12:25:23 homeassistant homeassistant[557]:   File "/usr/local/lib/python3.11/asyncio/events.py", line 80, in _run
Apr 28 12:25:23 homeassistant homeassistant[557]:     self._context.run(self._callback, *self._args)
Apr 28 12:25:23 homeassistant homeassistant[557]:   File "/usr/local/lib/python3.11/site-packages/aiohomekit/zeroconf.py", line 300, in _async_resolve_later
Apr 28 12:25:23 homeassistant homeassistant[557]:     self._async_handle_loaded_service_info(info)
Apr 28 12:25:23 homeassistant homeassistant[557]:   File "/usr/local/lib/python3.11/site-packages/aiohomekit/zeroconf.py", line 395, in _async_handle_loaded_service_info
Apr 28 12:25:23 homeassistant homeassistant[557]:     waiter.set_result(discovery)
Apr 28 12:25:23 homeassistant homeassistant[557]: asyncio.exceptions.InvalidStateError: invalid state
bdraco commented 3 months ago

CI will be fixed in https://github.com/Jc2k/aiohomekit/pull/373