This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

LwIP netconn_recv() timeout



Hi,

I'm running tyhe mcu_plus_sdk_am243x SDK with tcp server example.

I see that there's a  while ((err = netconn_recv(pClientConn, &buf)) == ERR_OK) loop and it works ok.

I would like to add a timeout because netconn_recv is blocking  so I use  sys_timeout(500, my_timeout_callback, pClientConn);

I get an  error from LWIP_ASSERT_CORE_LOCKED();

I've tried to add  sys_mutex_lock(&core_lock);   but I don't have   a core_lock variable.

Please advise on how to add a timeout to netconn_recv,

Thanks,

Eli