From f523b4dc84660e9859b3559106e9fb4ad0efdd86 Mon Sep 17 00:00:00 2001 From: Suren Gabrielyan Date: Tue, 28 Nov 2023 16:35:43 +0400 Subject: [PATCH 1/2] fix(websocket): consider failure if return value of `esp_websocket_client_send_with_exact_opcode` less than 0 --- components/esp_websocket_client/esp_websocket_client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/esp_websocket_client/esp_websocket_client.c b/components/esp_websocket_client/esp_websocket_client.c index 5088d3dc69..cfd036e041 100644 --- a/components/esp_websocket_client/esp_websocket_client.c +++ b/components/esp_websocket_client/esp_websocket_client.c @@ -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; } From c6448c3bd16e9707ed2e1c70aa230c2faa70e20f Mon Sep 17 00:00:00 2001 From: Suren Gabrielyan Date: Tue, 28 Nov 2023 16:42:55 +0400 Subject: [PATCH 2/2] bump(websocket): 1.2.0 -> 1.2.1 1.2.1 Bug Fixes - consider failure if return value of `esp_websocket_client_send_with_exact_opcode` less than 0 (f523b4d) - fix of return value for `esp_websocket_client_send_with_opcode` API (ba33588) --- components/esp_websocket_client/.cz.yaml | 2 +- components/esp_websocket_client/CHANGELOG.md | 7 +++++++ components/esp_websocket_client/idf_component.yml | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/components/esp_websocket_client/.cz.yaml b/components/esp_websocket_client/.cz.yaml index 5f2ab2dc17..0127396c5f 100644 --- a/components/esp_websocket_client/.cz.yaml +++ b/components/esp_websocket_client/.cz.yaml @@ -3,6 +3,6 @@ commitizen: bump_message: 'bump(websocket): $current_version -> $new_version' pre_bump_hooks: python ../../ci/changelog.py esp_websocket_client tag_format: websocket-v$version - version: 1.2.0 + version: 1.2.1 version_files: - idf_component.yml diff --git a/components/esp_websocket_client/CHANGELOG.md b/components/esp_websocket_client/CHANGELOG.md index 37a1362466..dcb6fbf34b 100644 --- a/components/esp_websocket_client/CHANGELOG.md +++ b/components/esp_websocket_client/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.2.1](https://github.com/espressif/esp-protocols/commits/websocket-v1.2.1) + +### Bug Fixes + +- consider failure if return value of `esp_websocket_client_send_with_exact_opcode` less than 0 ([f523b4d](https://github.com/espressif/esp-protocols/commit/f523b4d)) +- fix of return value for `esp_websocket_client_send_with_opcode` API ([ba33588](https://github.com/espressif/esp-protocols/commit/ba33588)) + ## [1.2.0](https://github.com/espressif/esp-protocols/commits/websocket-v1.2.0) ### Features diff --git a/components/esp_websocket_client/idf_component.yml b/components/esp_websocket_client/idf_component.yml index fea962d881..260c7307fd 100644 --- a/components/esp_websocket_client/idf_component.yml +++ b/components/esp_websocket_client/idf_component.yml @@ -1,4 +1,4 @@ -version: "1.2.0" +version: "1.2.1" description: WebSocket protocol client for ESP-IDF url: https://github.com/espressif/esp-protocols/tree/master/components/esp_websocket_client dependencies: