FreeRTOS+LWIP client stops running (task seems to die)

Basic details first, I am running FreeRTOS version 8.2.0 on a FRDM K64f board. I am using LWIP for an ethernet stack. I know there is FreeRTOS+TCP, but I don’t see an implementation for my MCU, and I had a demo I could work with that used LWIP/ The device recieves new data via an interrupt every 1ms. The data is put into a circular queue in the interrupt. I have one (manually created) task that runs in non interrupt time. It essentially reads the queue, if there is data, send it to a server via ethernet Shown Below
:::c
static void tcpecho_thread(void *arg)
{
    for(;;)
    {
        err_t err;
        struct netbuf *Buf = NULL;
        struct netconn *xNetConn = NULL;
        LWIP_UNUSED_ARG(arg);
        netif_set_up(&fsl_netif0);
        xNetConn = netconn_new ( NETCONN_TCP );
        int rc2 = netconn_connect ( xNetConn, &fsl_netif0_gw, 7 );
        while(1)
        {
            if(QueueTop!=QueueBottom)
            {
                Buf = netbuf_new();
                if(QueueTop>QueueBottom)
                {
                    if(QueueTop>QueueBottom)
                    {
                        char * testBuffer = pvPortMalloc(QueueTop-QueueBottom);
                        netbuf_alloc(Buf, QueueTop-QueueBottom);
                        memcpy(testBuffer,&Queue[QueueBottom],QueueTop-QueueBottom);
                        Buf->p->payload = testBuffer;
                        Buf->p->len = QueueTop-QueueBottom;
                        err = netconn_write(xNetConn, Buf->p->payload, Buf->p->len, NETCONN_COPY);
                        netbuf_delete(Buf);
                        vPortFree(testBuffer);
                    }else if (QueueTop<QueueBottom)
                    {
                        char * testBuffer = pvPortMalloc(QUEUESIZEMAX-QueueBottom);
                        netbuf_alloc(Buf, QUEUESIZEMAX-QueueBottom);
                        memcpy(testBuffer,&Queue[QueueBottom],QUEUESIZEMAX-QueueBottom);
                        Buf->p->payload = testBuffer;
                        Buf->p->len = QUEUESIZEMAX-QueueBottom;
                        err = netconn_write(xNetConn, Buf->p->payload, Buf->p->len, NETCONN_COPY);
                        netbuf_delete(Buf);
                        vPortFree(testBuffer);
                    }if(err==ERR_OK)
                    {
                        QueueRemove(Buf->p->len);
                    }
                }
                if (rc2 != ERR_OK || err != ERR_OK )
                {
                    PRINTF("ERROR DELETE CONNECTION");
                    netconn_delete ( xNetConn );
                }
            }
        }
    }
}
After running sucessfully for a minute or so, it just stops working. When I pause the debug session to see what is going on it seems to be stuck in an infinite loop in the backgroud, as if the RTOS is preempting the task somehow. The task is initiated with a priority of three with the following code in my main function:
 :::c
    sys_thread_new("tcpecho_thread", tcpecho_thread, NULL, TCPECHO_STACKSIZE, TCPECHO_PRIORITY);
    OSA_Start();
Any Ideas why? Also, if I should be using FreeRTOS+TCP, is there a basic configuration for my MCU somewhere? What edits would I need to make to the FreeRTOS+TCP code to get it to work?

FreeRTOS+LWIP client stops running (task seems to die)

It is very hard for us to support moderately complex third party software, such as lwIP, especially as lwIP has its own support mechanisms. In general terms, from your brief description, it sounds like the system is still running but something in your lwIP code is either deadlocked, blocked, or interrupts have stopped. From my experience most issues come from the Ethernet driver, as that is the bit that is different from MCU to MCU, and therefore the least tested. Using something like FreeRTOS+Trace might help you see what is going on.