Lock Netgear api during setup (#66033)

This commit is contained in:
starkillerOG
2022-02-08 02:50:38 +01:00
committed by GitHub
parent afd0005a31
commit f9c81dd00b

View File

@@ -123,6 +123,7 @@ class NetgearRouter:
async def async_setup(self) -> bool: async def async_setup(self) -> bool:
"""Set up a Netgear router.""" """Set up a Netgear router."""
async with self._api_lock:
if not await self.hass.async_add_executor_job(self._setup): if not await self.hass.async_add_executor_job(self._setup):
return False return False