mirror of https://github.com/ARMmbed/mbed-os.git
[ONME-2953 ]Minor glitch in error handling
In sendto(), memory allocation failures were mistakenly being treated as would blocks (assumption was that the device might be able to recover). However, that put the blocking socket into deep sleep and there was no mechanism to wake it up ever again. Somehow that got slipped through testing. Fixed in this amenmentpull/3517/head
parent
1f24533847
commit
1ac5700eb6
|
@ -569,7 +569,7 @@ nsapi_size_or_error_t NanostackInterface::do_sendto(void *handle, const ns_addre
|
|||
* \return -5 Socket not connected
|
||||
* \return -6 Packet too short (ICMP raw socket error).
|
||||
* */
|
||||
if (retcode == -2 || retcode == NS_EWOULDBLOCK) {
|
||||
if (retcode == NS_EWOULDBLOCK) {
|
||||
ret = NSAPI_ERROR_WOULD_BLOCK;
|
||||
} else if (retcode < 0) {
|
||||
tr_error("socket_sendmsg: error=%d", retcode);
|
||||
|
|
Loading…
Reference in New Issue