Today I found a bug where my client could save a reply under the wrong packet. The client grabbed whichever reply showed up first and assumed it belonged to the packet it had just sent. When a reply came back after the timeout, it got recorded as the next packet’s reply, and every packet after that was shifted by one. Nothing crashed. The data was just wrong.To prove it, I made my server hold a reply for 1.5 seconds while my timeout was 1 second. By accident, my first test delayed every packet after the 20th. The RTTs climbed from 1.5 s to 12 s, every other packet was marked lost, and the ones marked received carried an older packet’s time.The fix: every packet gets a deadline (send time + timeout), and the client keeps listening until the reply with the matching sequence number arrives or time runs out. Replies for older packets get counted as “late” and thrown away. Now the same test shows 1 lost, 1 late, and every packet after it keeps the right number. This matters because my jitter profile will produce late replies constantly, and without this fix every jitter run would have been garbage. i also added totola runtime and average packet rate
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.