mirror of
https://github.com/home-assistant/core.git
synced 2025-08-11 08:35:15 +02:00
Hold connection lock in Shelly RPC reconnect (#119009)
This commit is contained in:
@@ -586,7 +586,9 @@ class ShellyRpcCoordinator(ShellyCoordinatorBase[RpcDevice]):
|
||||
raise UpdateFailed(
|
||||
f"Sleeping device did not update within {self.sleep_period} seconds interval"
|
||||
)
|
||||
if self.device.connected:
|
||||
|
||||
async with self._connection_lock:
|
||||
if self.device.connected: # Already connected
|
||||
return
|
||||
|
||||
if not await self._async_device_connect_task():
|
||||
|
Reference in New Issue
Block a user