Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix raise condition #52

Merged
merged 2 commits into from
Apr 17, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion hass_nabucasa/remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,11 @@ async def connect(self) -> None:
_LOGGER.error("Connection problem to snitun server")
except RemoteBackendError:
_LOGGER.error("Can't refresh the snitun token")
except AttributeError:
pass # Ignore because HA shutdown on snitun token refresh
finally:
# start retry task
if not self._reconnect_task:
if self._snitun and not self._reconnect_task:
self._reconnect_task = self.cloud.run_task(self._reconnect_snitun())

async def disconnect(self) -> None:
Expand Down