Skip to content

Commit a185d6c

Browse files
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.
1 parent 91464b2 commit a185d6c

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

TESTS/netsocket/udp/udpsocket_echotest.cpp

Lines changed: 0 additions & 2 deletions
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

Lines changed: 1 addition & 1 deletion
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)