From a185d6c2773918a1209e9515ed9c7d217ddc9f03 Mon Sep 17 00:00:00 2001 From: Tymoteusz Bloch Date: Wed, 29 Jan 2020 18:04:34 +0100 Subject: [PATCH] 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. --- TESTS/netsocket/udp/udpsocket_echotest.cpp | 2 -- TESTS/netsocket/udp/udpsocket_sendto_repeat.cpp | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/TESTS/netsocket/udp/udpsocket_echotest.cpp b/TESTS/netsocket/udp/udpsocket_echotest.cpp index d9f39227669..d8f70b8c09c 100755 --- a/TESTS/netsocket/udp/udpsocket_echotest.cpp +++ b/TESTS/netsocket/udp/udpsocket_echotest.cpp @@ -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; diff --git a/TESTS/netsocket/udp/udpsocket_sendto_repeat.cpp b/TESTS/netsocket/udp/udpsocket_sendto_repeat.cpp index 871679e1973..1c71b049c22 100644 --- a/TESTS/netsocket/udp/udpsocket_sendto_repeat.cpp +++ b/TESTS/netsocket/udp/udpsocket_sendto_repeat.cpp @@ -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; }