mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 19:27:45 +00:00
Avoid future exception during setup of Synology DSM (#118583)
* avoid future exception during integration setup * clear future flag during setup * always clear the flag (with comment)
This commit is contained in:
parent
6ba9e7d5fd
commit
1a588760b9
@ -104,6 +104,11 @@ class SynoApi:
|
||||
except BaseException as err:
|
||||
if not self._login_future.done():
|
||||
self._login_future.set_exception(err)
|
||||
with suppress(BaseException):
|
||||
# Clear the flag as its normal that nothing
|
||||
# will wait for this future to be resolved
|
||||
# if there are no concurrent login attempts
|
||||
await self._login_future
|
||||
raise
|
||||
finally:
|
||||
self._login_future = None
|
||||
|
Loading…
x
Reference in New Issue
Block a user