mirror of
https://github.com/esphome/aioesphomeapi.git
synced 2025-02-17 01:51:23 +01:00
Fix connect login 2 (#128)
This commit is contained in:
parent
3b8b2d9d66
commit
ca3a14b1bc
@ -172,10 +172,10 @@ class APIClient:
|
|||||||
try:
|
try:
|
||||||
await self._connection.connect(login=login)
|
await self._connection.connect(login=login)
|
||||||
except APIConnectionError:
|
except APIConnectionError:
|
||||||
await _on_stop()
|
self._connection = None
|
||||||
raise
|
raise
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
await _on_stop()
|
self._connection = None
|
||||||
raise APIConnectionError(
|
raise APIConnectionError(
|
||||||
f"Unexpected error while connecting to {self._log_name}: {e}"
|
f"Unexpected error while connecting to {self._log_name}: {e}"
|
||||||
) from e
|
) from e
|
||||||
|
Loading…
Reference in New Issue
Block a user