Skip to content

Commit f7c5822

Browse files
authoredFeb 3, 2020
Merge pull request ARMmbed#12333 from tymoteuszblochmobica/udpfix
UDP echotests fix in case of no memory or device busy.
2 parents 02c5e08 + a185d6c commit f7c5822

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed
 

‎TESTS/netsocket/udp/udpsocket_echotest.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ void UDPSOCKET_ECHOTEST_impl(bool use_sendto)
100100
packets_sent++;
101101
} else {
102102
tr_warn("[Round#%02d - Sender] error, returned %d", s_idx, sent);
103-
continue;
104103
}
105104

106105
do {
@@ -207,7 +206,6 @@ void UDPSOCKET_ECHOTEST_NONBLOCK_impl(bool use_sendto)
207206
--retry_cnt;
208207
} else {
209208
tr_warn("[Round#%02d - Sender] error, returned %d", s_idx, sent);
210-
continue;
211209
}
212210

213211
int recvd;

‎TESTS/netsocket/udp/udpsocket_sendto_repeat.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ void UDPSOCKET_SENDTO_REPEAT()
4141
bool oom_earlier = false; // 2 times in a row -> time to give up
4242
for (i = 0; i < 100; i++) {
4343
sent = sock.sendto(udp_addr, tx_buffer, sizeof(tx_buffer));
44-
if (sent == NSAPI_ERROR_NO_MEMORY) {
44+
if (sent == NSAPI_ERROR_NO_MEMORY || sent == NSAPI_ERROR_BUSY) {
4545
if (oom_earlier) {
4646
break;
4747
}

0 commit comments

Comments
 (0)