Skip to content

Commit 4d7c684

Browse files
authored
Merge pull request #935 from gabsuren/refactor/websocket_timeout_check_remove
fix(websocket): remove redundant timeout check in client task loop
2 parents 318bca1 + 1e83bee commit 4d7c684

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

components/esp_websocket_client/esp_websocket_client.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1168,12 +1168,6 @@ static void esp_websocket_client_task(void *pv)
11681168
}
11691169
}
11701170
}
1171-
1172-
1173-
if (read_select == 0) {
1174-
ESP_LOGV(TAG, "Read poll timeout: skipping esp_transport_read()...");
1175-
break;
1176-
}
11771171
break;
11781172
case WEBSOCKET_STATE_WAIT_TIMEOUT:
11791173

@@ -1226,6 +1220,8 @@ static void esp_websocket_client_task(void *pv)
12261220
esp_websocket_client_abort_connection(client, WEBSOCKET_ERROR_TYPE_TCP_TRANSPORT);
12271221
xSemaphoreGiveRecursive(client->lock);
12281222
}
1223+
} else {
1224+
ESP_LOGV(TAG, "Read poll timeout: skipping esp_transport_poll_read().");
12291225
}
12301226
} else if (WEBSOCKET_STATE_WAIT_TIMEOUT == client->state) {
12311227
// waiting for reconnection or a request to stop the client...

0 commit comments

Comments
 (0)