Skip to content

Commit

Permalink
fix(websocket): consider failure if return value of `esp_websocket_cl…
Browse files Browse the repository at this point in the history
…ient_send_with_exact_opcode` less than 0
  • Loading branch information
suren-gabrielyan-espressif committed Nov 28, 2023
1 parent 6fda4c1 commit f523b4d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/esp_websocket_client/esp_websocket_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -1228,7 +1228,7 @@ int esp_websocket_client_send_with_opcode(esp_websocket_client_handle_t client,
goto unlock_and_return;
}
ret = esp_websocket_client_send_with_exact_opcode(client, opcode | WS_TRANSPORT_OPCODES_FIN, data, len, timeout);
if (ret <= 0) {
if (ret < 0) {
ESP_LOGE(TAG, "Failed to send the buffer");
goto unlock_and_return;
}
Expand Down

0 comments on commit f523b4d

Please sign in to comment.