Skip to content

Commit

Permalink
fix: do not reconnect on websocket error message
Browse files Browse the repository at this point in the history
  • Loading branch information
bj00rn committed Dec 15, 2023
1 parent 434b95f commit 8633981
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/pysaleryd/websocket.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def _retry(self) -> None:
return

if self._state == State.RETRYING:
_LOGGER.info(
_LOGGER.warning(
"Reconnecting to websocket failed (%s:%s) scheduling retry at an interval of %i seconds", # noqa: E501
self._host,
self._port,
Expand Down Expand Up @@ -126,8 +126,8 @@ async def _running(self) -> None:
break

if msg.type == aiohttp.WSMsgType.ERROR:
_LOGGER.warning("Websocket error (%s)", msg)
break
_LOGGER.warning("Received websocket error (%s)", msg)
continue

if msg.type == aiohttp.WSMsgType.TEXT:
_LOGGER.debug("Received: %s", msg.data)
Expand Down

0 comments on commit 8633981

Please sign in to comment.