Merge branch 'bugfix/ws_send_abort_v3.2' into 'release/v3.2'

websocket client: the client now aborts the connection if send fails. (v3.2)

See merge request espressif/esp-idf!9172
This commit is contained in:
Jiang Jiang Jian 2020-07-15 16:36:51 +08:00
commit 0eb17e7601

View file

@ -663,6 +663,7 @@ static int esp_websocket_client_send_with_opcode(esp_websocket_client_handle_t c
if (wlen <= 0) { if (wlen <= 0) {
ret = wlen; ret = wlen;
ESP_LOGE(TAG, "Network error: esp_transport_write() returned %d, errno=%d", ret, errno); ESP_LOGE(TAG, "Network error: esp_transport_write() returned %d, errno=%d", ret, errno);
esp_websocket_client_abort_connection(client);
goto unlock_and_return; goto unlock_and_return;
} }
current_opcode = 0; current_opcode = 0;