Skip to content

Commit

Permalink
Fix cloud reloging logic
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexxIT committed Apr 19, 2024
1 parent 0aeaea9 commit bb0e59b
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions custom_components/sonoff/core/ewelink/cloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -519,9 +519,12 @@ async def run_forever(self, **kwargs):
_LOGGER.debug(f"Cloud connection retrying in {delay} seconds")
await asyncio.sleep(delay)

if not self.auth and not await self.login(**kwargs):
fails += 1
continue
if not self.auth:
try:
assert await self.login(**kwargs)
except:
fails += 1
continue

if not await self.connect():
fails += 1
Expand Down

0 comments on commit bb0e59b

Please sign in to comment.