Skip to content

Commit a3a5f6b

Browse files
authored
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
1 parent 8d3eded commit a3a5f6b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

supervisor/api/ingress.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -391,9 +391,9 @@ async def _websocket_forward(ws_from, ws_to):
391391
elif msg.type == aiohttp.WSMsgType.BINARY:
392392
await ws_to.send_bytes(msg.data)
393393
elif msg.type == aiohttp.WSMsgType.PING:
394-
await ws_to.ping()
394+
await ws_to.ping(msg.data)
395395
elif msg.type == aiohttp.WSMsgType.PONG:
396-
await ws_to.pong()
396+
await ws_to.pong(msg.data)
397397
elif ws_to.closed:
398398
await ws_to.close(code=ws_to.close_code, message=msg.extra)
399399
except RuntimeError:

0 commit comments

Comments
 (0)