mirror of
https://github.com/espressif/esp-protocols.git
synced 2025-11-02 23:51:38 +01:00
When WiFi disconnects, `esp_websocket_client_task` continues polling `esp_transport_poll_read()` with a default 1-second timeout. If a timeout triggers `esp_websocket_client_abort_connection`, certain resources are released. However, if `esp_websocket_client_send_with_exact_opcode` is still blocked at this point, it will cause a crash when it times out and accesses the released handle. This fix prevents potential crashes by ensuring proper synchronization between abort and send functions. Merges: https://github.com/espressif/esp-protocols/pull/629