Skip to content

Commit

Permalink
Merge pull request #495 from eht-datarespons/master
Browse files Browse the repository at this point in the history
fix(websocket): Continue waiting for TCP connection to be closed (IDFGH-11965)
  • Loading branch information
david-cermak authored Feb 8, 2024
2 parents 96f4ebd + d853118 commit 38a3631
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions components/esp_websocket_client/esp_websocket_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
int ret = esp_transport_ws_poll_connection_closed(client->transport, 1000);
if (ret == 0) {
// still waiting
break;
}
if (ret < 0) {
ESP_LOGW(TAG, "Did not get TCP close within expected delay");

} else if (ret < 0) {
ESP_LOGW(TAG, "Connection terminated while waiting for clean TCP close");
}
client->run = false;
Expand Down

0 comments on commit 38a3631

Please sign in to comment.