Skip to content

Commit 38a3631

Browse files
authored
Merge pull request #495 from eht-datarespons/master
fix(websocket): Continue waiting for TCP connection to be closed (IDFGH-11965)
2 parents 96f4ebd + d853118 commit 38a3631

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

components/esp_websocket_client/esp_websocket_client.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1039,10 +1039,9 @@ static void esp_websocket_client_task(void *pv)
10391039
ESP_LOGD(TAG, " Waiting for TCP connection to be closed by the server");
10401040
int ret = esp_transport_ws_poll_connection_closed(client->transport, 1000);
10411041
if (ret == 0) {
1042-
// still waiting
1043-
break;
1044-
}
1045-
if (ret < 0) {
1042+
ESP_LOGW(TAG, "Did not get TCP close within expected delay");
1043+
1044+
} else if (ret < 0) {
10461045
ESP_LOGW(TAG, "Connection terminated while waiting for clean TCP close");
10471046
}
10481047
client->run = false;

0 commit comments

Comments
 (0)