mirror of
https://github.com/espressif/esp-protocols.git
synced 2025-07-16 20:12:13 +02:00
fix(websocket): Continue waiting for TCP connection to be closed
Prevents an issue where WEBSOCKET_EVENT_CLOSED is not sent after websocket is closed.
This commit is contained in:
@ -1040,7 +1040,7 @@ static void esp_websocket_client_task(void *pv)
|
|||||||
int ret = esp_transport_ws_poll_connection_closed(client->transport, 1000);
|
int ret = esp_transport_ws_poll_connection_closed(client->transport, 1000);
|
||||||
if (ret == 0) {
|
if (ret == 0) {
|
||||||
// still waiting
|
// still waiting
|
||||||
break;
|
continue;
|
||||||
}
|
}
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
ESP_LOGW(TAG, "Connection terminated while waiting for clean TCP close");
|
ESP_LOGW(TAG, "Connection terminated while waiting for clean TCP close");
|
||||||
|
Reference in New Issue
Block a user