Raspberry Pi Pico W C/C++ SDK support, It gets stuck at the function cyw43_arch_poll()

I use raspberry pi pico w sdk 1.5.1. Upload works for up to 100 files in the s3 directory. What could be the problem since this always stops uploading on file 101 and i can’t received any response from the server. It stuck here in the function: cyw43_arch_poll();

int32_t recvUsingLwIP(NetworkContext_t *pNetContext, void *buf, size_t buflen)
{
    int32_t ret = ERR_VAL;
    if(buf == NULL)
    {
        printf("Error: recvUsingLwIP - buf pointer is NULL\n");
        return ret;
    }
    if(pNetContext == NULL)
    {
        printf("Error: recvUsingLwIP - Network Context pointer is NULL\n");
        return ret; 
    }
    if(buflen < 1)
    {
        printf("Error: recvUsingLwIP - buf less then 1\n");
        return ret;
    }

    while(1)
    {
        cyw43_arch_poll();
        if(pNetContext->readFlag == 1)
        {
            pNetContext->readFlag = 0;
            memcpy(buf, lwipRecToCorehttpRec, pNetContext->bytesToRecv);
            memset(lwipRecToCorehttpRec, 0, sizeof(lwipRecToCorehttpRec));
            return pNetContext->bytesToRecv;
        }
    }   
}

Did you check Wireshark to see if the server actually doesn’t send a response to the Pico W or if it sends a response to the Pico W and it still get stuck?

Yes I checked wireshark and the server send a response to the Pico W and it still get stuck.