title: ESP32 FreeRTOS Task should not return
body: <p>I am using multi threading to execute multiple tasks which are available in the queue one by one.
  After one task ends, I execute another task but while executing the second task in queue, I am facing error.</p>
  <pre><code>E (18470) FreeRTOS: FreeRTOS Task &quot;taskTwo&quot; should not return, Aborting now!
  </code></pre>
  <p>Here is my code,</p>
  <pre><code>QueueHandle_t priorityTwoQue;
  TaskHandle_t thTwo;
  
  void receiveTaskDataFromSomeFunction() {
  
    dataholder = (struct DataHolder *)malloc(sizeof(struct DataHolder));
    extractData(jsonBuffer, dataholder);
    jsonBuffer.clear();
  
    SerialDebug.print(&quot;Requst Sending To Que&quot;);
    xQueueSend(priorityTwoQue, &amp;dataholder, portMAX_DELAY);
  
    processQueue();
        
  }
  
  void processQueue() {
  
    delay(100);
    SerialDebug.println(&quot;Creating Task Prio 2&quot;);
    xTaskCreate(taskPriorityTwo, &quot;TaskTwo&quot;, 5000, NULL, 2, &amp;thTwo);
  
  }
  
  void taskPriorityTwo(void * paramter) {
  
    SerialDebug.println(&quot;Task Initiated&quot;);
    threadTask(priorityTwoQue, &quot;task2&quot;);
    vTaskDelete(thTwo);
  
  }
  
  
  void threadTask(QueueHandle_t priorityQue, String taskName) {
  
     struct DataHolder *taskdataholder;
     xQueueReceive(priorityQue, &amp;taskdataholder, portMAX_DELAY);
     SerialDebug.print(&quot;Executing Task&quot;);
     executeHttpRequest(taskdataholder);   
     requestInProgress = false;
     processQueue();
  
  }
  </code></pre>
  <p>In the above code receiveTaskDataFromSomeFunction() is called whenever new task request is received, how ever in my case 4 requests are received one by one with an interval of 1 second. Hence i am putting them into the queue. Each request is executed as an http request which takes 5 seconds to compelete.</p>
  <p>This code executes the first request without any issue but on executing the second request i get the error which i have mentioned above.</p>
  <p>My question is how can i resolve this issue of executing the tasks which are available in queue one by one.</p>