mirror of
https://github.com/esphome/aioesphomeapi.git
synced 2024-11-22 12:05:12 +01:00
Fix connect login 2 (#128)
This commit is contained in:
parent
3b8b2d9d66
commit
ca3a14b1bc
@ -172,10 +172,10 @@ class APIClient:
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user