fix: disable library WebSocket keepalive for device server
websockets.serve() defaults to ping_interval=20 and ping_timeout=20. ESP32 clients that do not answer those pings are dropped with 1011 keepalive ping timeout roughly 40 seconds into a healthy session. The application-level ping is configured separately via enable_websocket_ping. Refs #3348
This commit is contained in:
1 parent
c02becdc80
commit
eda3c23d51
1 file changed
+5
-1
@@ -74,7 +74,11 @@ class WebSocketServer:
|
||||
port = int(server_config.get("port", 8000))
|
||||
|
||||
async with websockets.serve(
|
||||
self._handle_connection, host, port, process_request=self._http_response
|
||||
self._handle_connection,
|
||||
host,
|
||||
port,
|
||||
process_request=self._http_response,
|
||||
ping_interval=None,
|
||||
):
|
||||
await asyncio.Future()
|
||||
|
||||
|
||||
Reference in new issue
Block a user