mirror of https://github.com/ARMmbed/mbed-os.git
lwip: Added delay to dtls handshake test to compensate for local network
The speed of packets on the local network exceeds even the speed of the ethernet hardware on some of the less powerful devices. Adding a small delay which can be expected from a real DTLS handshake prevents this condition from occuring.pull/3781/head
parent
21b91c794e
commit
64ccff3fe1
|
@ -20,6 +20,7 @@ import socket
|
|||
import json
|
||||
import random
|
||||
import itertools
|
||||
import time
|
||||
from sys import stdout
|
||||
from threading import Thread
|
||||
from SocketServer import BaseRequestHandler, UDPServer
|
||||
|
@ -42,6 +43,9 @@ class UDPEchoClientHandler(BaseRequestHandler):
|
|||
data = ''.join(map(chr, data))
|
||||
sock.sendto(data, self.client_address)
|
||||
|
||||
# Sleep a tiny bit to compensate for local network
|
||||
time.sleep(0.01)
|
||||
|
||||
|
||||
class UDPEchoClientTest(BaseHostTest):
|
||||
def __init__(self):
|
||||
|
|
Loading…
Reference in New Issue