mirror of https://github.com/ARMmbed/mbed-os.git
UDP echotests hold in case of no memory or device busy status.
This gives possibility of freeing memory and mesh device recover from busy state.pull/12333/head
parent
91464b2729
commit
a185d6c277
|
|
@ -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