From 991ac40d751a19365b343567cd32a2d620a7a0aa Mon Sep 17 00:00:00 2001 From: Richard Allen Date: Wed, 30 Oct 2024 16:54:45 -0500 Subject: [PATCH] fix(websocket): use proper interface to delete semaphore On most implementations, including ESP-IDF FreeRTOS, vSemaphoreDelete() is a macro that calls vQueueDelete(). But since the client semaphore is created with xSemaphoreCreateRecursiveMutex(), delete it as a semaphore with vSemaphoreDelete(). --- 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 953a7b1d29..dc28cdd240 100644 --- a/components/esp_websocket_client/esp_websocket_client.c +++ b/components/esp_websocket_client/esp_websocket_client.c @@ -434,7 +434,7 @@ static void destroy_and_free_resources(esp_websocket_client_handle_t client) if (client->transport_list) { esp_transport_list_destroy(client->transport_list); } - vQueueDelete(client->lock); + vSemaphoreDelete(client->lock); free(client->tx_buffer); free(client->rx_buffer); free(client->errormsg_buffer);