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:
Eldar Hauge Torkelsen
2024-01-23 14:58:27 +01:00
parent f42c0adfc0
commit 2b092e0db4

View File

@ -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");