Skip to content

Commit d5ac063

Browse files
committed
Allowing dtls test to retry correctly.
The dtls test already has the ability to retry upon a UDP failure. However the sockets are currently configured to be blocking and to wait forever. I added a timeout of 1.5 seconds in order the test to correctly timeout.
1 parent 0b5b6cb commit d5ac063

File tree

1 file changed

+2
-0
lines changed
  • features/FEATURE_LWIP/TESTS/mbedmicro-net/udp_dtls_handshake

1 file changed

+2
-0
lines changed

features/FEATURE_LWIP/TESTS/mbedmicro-net/udp_dtls_handshake/main.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ int main() {
7171

7272
UDPSocket sock;
7373
SocketAddress udp_addr(ipbuf, port);
74+
sock.set_blocking(true);
75+
sock.set_timeout(1500);
7476

7577
for (int attempt = 0; attempt < MBED_CFG_UDP_DTLS_HANDSHAKE_RETRIES; attempt++) {
7678
err = sock.open(&eth);

0 commit comments

Comments
 (0)