Skip to content

Commit

Permalink
Fix connect login 2 (#128)
Browse files Browse the repository at this point in the history
  • Loading branch information
OttoWinter authored Oct 21, 2021
1 parent 3b8b2d9 commit ca3a14b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions aioesphomeapi/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,10 @@ async def _on_stop() -> None:
try:
await self._connection.connect(login=login)
except APIConnectionError:
await _on_stop()
self._connection = None
raise
except Exception as e:
await _on_stop()
self._connection = None
raise APIConnectionError(
f"Unexpected error while connecting to {self._log_name}: {e}"
) from e
Expand Down

0 comments on commit ca3a14b

Please sign in to comment.