title: UDP response received after timeout
body: <p>We have an UDP client that communicates against a server.</p>
  
  <p>The server gives a single response on each request.</p>
  
  <p>The client sends a request, and waits 5 seconds for the response.</p>
  
  <p>If the server's response was not received by 5 seconds - the client assumes that the packet was lost in the network (this is UDP...), writes a report to a log, and sends the next request.</p>
  
  <p>But, sometimes we have any delay in the network, and the server's response comes after 5 seconds.</p>
  
  <p>Let's describe the scenario:</p>
  
  <p>The client sent a packet named "X".</p>
  
  <p>The timeout of 5 seconds expired, and the client reports that "X" is a lost packet.</p>
  
  <p>The client sent another packet named "Y".</p>
  
  <p>The server's response on "X" comes now to the client.</p>
  
  <p>The client sees that the response is not compatible to the request, and report it to the log.</p>
  
  <p>The client sent another packet named "Z".</p>
  
  <p>The server's response on "Y" comes now to the client.</p>
  
  <p>The client sees that the response is not compatible to the request, and report it to the log.</p>
  
  <p>And this is an infinity loop!</p>
  
  <p>What can we do?</p>