bug #49533: start persist timer when unsent seg can't fit in window

This commit returns LwIP to previous behavior where if the next unsent
segment can't be sent due to the current send window, we start the
persist timer. This is done to engage window probing in the case that
the subsequent window update from the receiver is dropped, thus
preventing connection deadlock

This commit refines the previous logic to only target the following case:
 1) Next unsent segment doesn't fit within the send window (not
    congestion) and there is some room in the window
 2) Unacked queue is empty (otherwise data is inflight and the RTO timer
    will take care of any dropped window updates)

See commit d8f090a7595a79050c435545d00efc1261b9691c (which removed this
behavior) to reference the old logic. The old logic falsely started the
persit timer when the RTO timer was already running.
1 file changed