Skip to content

Commit

Permalink
Fix Websocket Loop - AuthToken Refresh
Browse files Browse the repository at this point in the history
  • Loading branch information
ReneNulschDE committed Nov 26, 2023
1 parent 50148e1 commit 28a197a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions custom_components/mbapi2020/websocket.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,10 @@ async def _async_stop_handler(event):
session = async_get_clientsession(self._hass, VERIFY_SSL)
self.set_connection_state(STATE_CONNECTING)

headers = await self._websocket_connection_headers()

websocket_url = helper.Websocket_url(self._region)
while True:
try:
headers = await self._websocket_connection_headers()
self.is_connecting = True
LOGGER.info("Connecting to %s", websocket_url)
self._connection = await session.ws_connect(websocket_url, headers=headers, proxy=SYSTEM_PROXY)
Expand Down

0 comments on commit 28a197a

Please sign in to comment.