Skip to content

Commit 542547d

Browse files
authored
Merge pull request #684 from david-cermak/fix/ws_disconnect_deadlock
[websocket]: Prevent crash on network disconnect during send
2 parents 72f4f7c + 2bcfa45 commit 542547d

File tree

4 files changed

+26
-2
lines changed

4 files changed

+26
-2
lines changed

components/esp_websocket_client/.cz.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ commitizen:
33
bump_message: 'bump(websocket): $current_version -> $new_version'
44
pre_bump_hooks: python ../../ci/changelog.py esp_websocket_client
55
tag_format: websocket-v$version
6-
version: 1.2.3
6+
version: 1.3.0
77
version_files:
88
- idf_component.yml

components/esp_websocket_client/CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,27 @@
11
# Changelog
22

3+
## [1.3.0](https://github.com/espressif/esp-protocols/commits/websocket-v1.3.0)
4+
5+
### Features
6+
7+
- add events for begin/end thread ([d7fa24bc](https://github.com/espressif/esp-protocols/commit/d7fa24bc))
8+
- Make example to use certificate bundle ([aecf6f80](https://github.com/espressif/esp-protocols/commit/aecf6f80))
9+
- propagate esp_tls stack error and cert verify flags ([234f579b](https://github.com/espressif/esp-protocols/commit/234f579b))
10+
- Add option to set and use cert_common_name in Websocket client ([3a6720de](https://github.com/espressif/esp-protocols/commit/3a6720de))
11+
- adding support for `if_name` when using WSS transport ([333a6893](https://github.com/espressif/esp-protocols/commit/333a6893))
12+
- allow updating reconnect timeout for retry backoffs ([bd9f0627](https://github.com/espressif/esp-protocols/commit/bd9f0627))
13+
- allow using external tcp transport handle ([83ea2876](https://github.com/espressif/esp-protocols/commit/83ea2876))
14+
- adding support for `keep_alive_enable` when using WSS transport ([c728eae5](https://github.com/espressif/esp-protocols/commit/c728eae5))
15+
16+
### Bug Fixes
17+
18+
- Prevent crash on network disconnect during send ([a453ca1f](https://github.com/espressif/esp-protocols/commit/a453ca1f))
19+
- use proper interface to delete semaphore ([991ac40d](https://github.com/espressif/esp-protocols/commit/991ac40d))
20+
- Move client to different state when disconnecting ([0d8f2a6d](https://github.com/espressif/esp-protocols/commit/0d8f2a6d))
21+
- fix of websocket host example ([5ccc018a](https://github.com/espressif/esp-protocols/commit/5ccc018a))
22+
- don't get transport from the list if external transport is used ([9d4d5d2d](https://github.com/espressif/esp-protocols/commit/9d4d5d2d))
23+
- Fix locking issues of `esp_websocket_client_send_with_exact_opcode` API ([6393fcd7](https://github.com/espressif/esp-protocols/commit/6393fcd7))
24+
325
## [1.2.3](https://github.com/espressif/esp-protocols/commits/websocket-v1.2.3)
426

527
### Features

components/esp_websocket_client/esp_websocket_client.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1083,7 +1083,9 @@ static void esp_websocket_client_task(void *pv)
10831083
} else {
10841084
esp_websocket_client_error(client, "esp_transport_poll_read() returned %d, errno=%d", read_select, errno);
10851085
}
1086+
xSemaphoreTakeRecursive(client->lock, lock_timeout);
10861087
esp_websocket_client_abort_connection(client, WEBSOCKET_ERROR_TYPE_TCP_TRANSPORT);
1088+
xSemaphoreGiveRecursive(client->lock);
10871089
}
10881090
} else if (WEBSOCKET_STATE_WAIT_TIMEOUT == client->state) {
10891091
// waiting for reconnecting...

components/esp_websocket_client/idf_component.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: "1.2.3"
1+
version: "1.3.0"
22
description: WebSocket protocol client for ESP-IDF
33
url: https://github.com/espressif/esp-protocols/tree/master/components/esp_websocket_client
44
dependencies:

0 commit comments

Comments
 (0)