| 38 | } |
| 39 | |
| 40 | WebClient::WebClient() : Channel("webclient") { |
| 41 | if (WebClients::_background_task_queue == nullptr) // If we are the first instanciation ever, create the event queue |
| 42 | WebClients::_background_task_queue = xQueueCreate(64, sizeof(WebClient*)); |
| 43 | if (WebClients::_background_task_handle == nullptr) { // Same here, create the unique background task |
| 44 | xTaskCreatePinnedToCore(WebClients::background_task, // task |
| 45 | "WebClient_background_task", // name for task |
| 46 | 5 * 1024, // 4KB seems enough, 3.5 crash, setting to 5KB |
| 47 | NULL, // parameters |
| 48 | 20, // priority // If higher than (ASYNC TCP?) the commands like [ESP800] return faster |
| 49 | &WebClients::_background_task_handle, |
| 50 | SUPPORT_TASK_CORE // not sure if SUPPORT_TASK_CORE is the best choice |
| 51 | ); |
| 52 | } |
| 53 | } |
| 54 | |
| 55 | WebClient::~WebClient() { |
| 56 | xBufferLock.lock(); |
nothing calls this directly
no test coverage detected