We drain paths on close that might've started "draining" a little longer ago for too long.
E.g:
- Establish connection at 0ms
- Open Path 1 at 100ms (it has the same RTT and variance as the initial RTT)
- Abandon Path 1 at 200ms (it now "starts draining" in the path-close sense, not the connection close sense. It will drain for 3 * PTO = 3s)
- Close the connection at 3000ms. Now we drain all paths. We also drain Path 1, which makes
pto_max_path be 3s. So we drain for that time (even though we've started "draining" it 2.8s ago)
- Connection closes at 6000ms having drained fully.
Originally posted by @matheus23 in #366 (comment)
Originally posted by @matheus23 in #366 (comment)