You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After further investigation, I've found one more issue in this piece of code.
Even if "wait_readable" returns NSAPI_ERROR_WOULD_BLOCK, "WIZnetInterface::socket_recv" returns zero, because recved_size is always zero in this case.
Either recved_size should be declared like this int recved_size = -1;
or condition should be if(recved_size > 0){
According to the Mbed documentation socket.recv method should return NSAPI_ERROR_WOULD_BLOCK in case it non-blocking or timeout.
But if we check the code we can see that it returns size in case of timeout (zero in many cases).
It seems incorrect. Am I wrong?
The text was updated successfully, but these errors were encountered: