fix: websockets 16.0 API — убрать аргумент 'path' из handle_websocket()
В websockets 16.0 изменилась сигнатура handler: - Было: async def handler(websocket, path) - Стало: async def handler(websocket) Fix для satellite.py: - handle_websocket(websocket) без path - Добавлен комментарий про websockets 16.0+
This commit is contained in:
@@ -1033,7 +1033,13 @@ class SatelliteBase:
|
||||
_LOGGER.warning("websockets package not installed, skipping WebSocket server")
|
||||
return
|
||||
|
||||
async def handle_websocket(websocket, path): # type: ignore
|
||||
async def handle_websocket(websocket): # type: ignore
|
||||
"""
|
||||
Handle WebSocket connection.
|
||||
|
||||
Note: websockets 16.0+ doesn't pass 'path' argument anymore.
|
||||
Use websocket.path if needed.
|
||||
"""
|
||||
client_addr = websocket.remote_address
|
||||
_LOGGER.info(f"WebSocket client connected: {client_addr}")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user