Skip to content

Commit

Permalink
fix(websocket): use proper interface to delete semaphore
Browse files Browse the repository at this point in the history
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().
  • Loading branch information
bryghtlabs-richard committed Oct 30, 2024
1 parent fbd296f commit 991ac40
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/esp_websocket_client/esp_websocket_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 991ac40

Please sign in to comment.