mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #12333 from tymoteuszblochmobica/udpfix
UDP echotests fix in case of no memory or device busy.pull/12357/head
commit
f7c58221be
|
@ -100,7 +100,6 @@ void UDPSOCKET_ECHOTEST_impl(bool use_sendto)
|
|||
packets_sent++;
|
||||
} else {
|
||||
tr_warn("[Round#%02d - Sender] error, returned %d", s_idx, sent);
|
||||
continue;
|
||||
}
|
||||
|
||||
do {
|
||||
|
@ -207,7 +206,6 @@ void UDPSOCKET_ECHOTEST_NONBLOCK_impl(bool use_sendto)
|
|||
--retry_cnt;
|
||||
} else {
|
||||
tr_warn("[Round#%02d - Sender] error, returned %d", s_idx, sent);
|
||||
continue;
|
||||
}
|
||||
|
||||
int recvd;
|
||||
|
|
|
@ -41,7 +41,7 @@ void UDPSOCKET_SENDTO_REPEAT()
|
|||
bool oom_earlier = false; // 2 times in a row -> time to give up
|
||||
for (i = 0; i < 100; i++) {
|
||||
sent = sock.sendto(udp_addr, tx_buffer, sizeof(tx_buffer));
|
||||
if (sent == NSAPI_ERROR_NO_MEMORY) {
|
||||
if (sent == NSAPI_ERROR_NO_MEMORY || sent == NSAPI_ERROR_BUSY) {
|
||||
if (oom_earlier) {
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue