Merge pull request #495 from eht-datarespons/master

fix(websocket): Continue waiting for TCP connection to be closed (IDFGH-11965)
This commit is contained in:
david-cermak
2024-02-08 14:37:44 +01:00
committed by GitHub

View File

@ -1039,10 +1039,9 @@ static void esp_websocket_client_task(void *pv)
ESP_LOGD(TAG, " Waiting for TCP connection to be closed by the server"); ESP_LOGD(TAG, " Waiting for TCP connection to be closed by the server");
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 ESP_LOGW(TAG, "Did not get TCP close within expected delay");
break;
} } else 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");
} }
client->run = false; client->run = false;