Don't wait to refresh expired token until connection is open
balloob opened this issue · comments
Paulus Schoutsen commented
Currently we wait till the websocket connection is open until we check if our access token has expired and renew if it has. We should check if the token has expired the moment we open the connection and have that run in parallel with setting up the websocket connection.
home-assistant-js-websocket/lib/socket.ts
Lines 74 to 77 in ff14d21