mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-12-24 20:35:55 +00:00
Fix WebSocket proxy for add-ons not forwarding ping/pong frame data (#6144)
* Fix proxied add-on WebSocket connections closing after 40 seconds * Undo autoping=True * Add debug logging for ping/pong frames * Foward ping and pong msg.data too * Add temporary workaround for devcontainer issue * Forward 8000 through docker devcontainer * Remove debug code
This commit is contained in:
@@ -391,9 +391,9 @@ async def _websocket_forward(ws_from, ws_to):
|
||||
elif msg.type == aiohttp.WSMsgType.BINARY:
|
||||
await ws_to.send_bytes(msg.data)
|
||||
elif msg.type == aiohttp.WSMsgType.PING:
|
||||
await ws_to.ping()
|
||||
await ws_to.ping(msg.data)
|
||||
elif msg.type == aiohttp.WSMsgType.PONG:
|
||||
await ws_to.pong()
|
||||
await ws_to.pong(msg.data)
|
||||
elif ws_to.closed:
|
||||
await ws_to.close(code=ws_to.close_code, message=msg.extra)
|
||||
except RuntimeError:
|
||||
|
||||
Reference in New Issue
Block a user