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.
pull/4369/head
Brian Daniels 2017-04-27 15:40:19 -05:00 committed by Martin Kojtal
parent 13334105e4
commit 26eafd9958
1 changed files with 2 additions and 0 deletions

View File

@ -71,6 +71,8 @@ int main() {
UDPSocket sock;
SocketAddress udp_addr(ipbuf, port);
sock.set_blocking(true);
sock.set_timeout(1500);
for (int attempt = 0; attempt < MBED_CFG_UDP_DTLS_HANDSHAKE_RETRIES; attempt++) {
err = sock.open(&eth);