mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +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
e485a0c6f2
commit
46eb779c5c
@ -104,6 +104,11 @@ class SynoApi:
|
|||||||
except BaseException as err:
|
except BaseException as err:
|
||||||
if not self._login_future.done():
|
if not self._login_future.done():
|
||||||
self._login_future.set_exception(err)
|
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
|
raise
|
||||||
finally:
|
finally:
|
||||||
self._login_future = None
|
self._login_future = None
|
||||||
|
Loading…
x
Reference in New Issue
Block a user