mirror of
https://github.com/espressif/esp-idf.git
synced 2026-08-04 22:30:13 +03:00
The WebSocket echo server test connects immediately after seeing
'Starting server on port:' in the device log, but the /ws URI handler
is registered asynchronously after the server starts, taking 40-660ms
depending on config and CI load.
This causes WebSocket handshake to return 404 Not Found because the
URI handler is not registered yet when the client connects.
Wait for 'Returned from app_main()' before connecting, which
guarantees all URI handlers are registered. Add connection retry
with WebSocketBadStatusException handling to WsClient.
(cherry picked from commit 7a50e3ab04)