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

Limit snitun error to only log if we are reconnecting #570

Merged
merged 3 commits into from
Feb 19, 2024
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
6 changes: 2 additions & 4 deletions hass_nabucasa/remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -415,11 +415,9 @@ async def connect(self) -> None:
except asyncio.TimeoutError:
_LOGGER.error("Timeout connecting to snitun server")
except SniTunConnectionError as err:
can_reconnect = self._snitun and not self._reconnect_task
_LOGGER.log(
logging.INFO if can_reconnect else logging.ERROR,
"Connection problem to snitun server%s (%s)",
", reconnecting" if can_reconnect else "",
logging.ERROR if self._reconnect_task is not None else logging.INFO,
"Connection problem to snitun server (%s)",
err,
)
except RemoteBackendError:
Expand Down