Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions components/esp_websocket_client/esp_websocket_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -666,9 +666,15 @@ static int esp_websocket_client_send_with_exact_opcode(esp_websocket_client_hand
}
memcpy(client->tx_buffer, data + widx, need_write);
// send with ws specific way and specific opcode
errno = 0;
wlen = esp_transport_ws_send_raw(client->transport, opcode, (char *)client->tx_buffer, need_write,
(timeout == portMAX_DELAY) ? -1 : timeout * portTICK_PERIOD_MS);
if (wlen < 0 || (wlen == 0 && need_write != 0)) {
if (wlen == 0 && timeout != portMAX_DELAY && errno == 0) {
ret = widx;
esp_websocket_free_buf(client, true);
goto unlock_and_return;
}
ret = wlen;
esp_websocket_free_buf(client, true);
esp_tls_error_handle_t error_handle = esp_transport_get_error_handle(client->transport);
Expand Down
Loading