Websocket client: avoid deadlock if stop called from event handler

This commit is contained in:
Marius Vikhammer
2020-08-06 14:48:13 +08:00
parent c756f7c4d2
commit 3d952d3f56
2 changed files with 18 additions and 2 deletions

View File

@@ -123,6 +123,9 @@ esp_err_t esp_websocket_client_start(esp_websocket_client_handle_t client);
/**
* @brief Close the WebSocket connection
*
* Notes:
* - Cannot be called from the websocket event handler
*
* @param[in] client The client
*
* @return esp_err_t
@@ -134,7 +137,10 @@ esp_err_t esp_websocket_client_stop(esp_websocket_client_handle_t client);
* This function must be the last function to call for an session.
* It is the opposite of the esp_websocket_client_init function and must be called with the same handle as input that a esp_websocket_client_init call returned.
* This might close all connections this handle has used.
*
*
* Notes:
* - Cannot be called from the websocket event handler
*
* @param[in] client The client
*
* @return esp_err_t