feat(websocket): add unregister event to websocket client

This commit is contained in:
glmfe
2025-02-12 08:44:41 -03:00
parent 87e96b4682
commit ce160505dc
3 changed files with 33 additions and 10 deletions

View File

@ -227,6 +227,7 @@ static void websocket_app_start(void)
xSemaphoreTake(shutdown_sema, portMAX_DELAY);
esp_websocket_client_close(client, portMAX_DELAY);
ESP_LOGI(TAG, "Websocket Stopped");
esp_websocket_unregister_events(client, WEBSOCKET_EVENT_ANY, websocket_event_handler);
esp_websocket_client_destroy(client);
}