• Fabrice Bellet's avatar
    stun: set delay in retransmission instead of adding it · ade16ee9
    Fabrice Bellet authored
    We may have situation when stun_timer_refresh is called with a
    significant delay after the current deadline. In the actual situation,
    this delay is just included to the computation of the new deadline of the
    next stun retransmission. We think this may lead to unfair situations,
    where the next deadline may be too short, just to compensate the first
    deadline that was too long.
    
    For example, if a stun request is scheduled with a delay of
    200ms for the 2nd transmission, and 400ms for the 3rd transmission,
    if stun_timer_remainder() is called 300ms after the start of the
    timer, the second delay will last only 300ms, instead of 400ms.
    ade16ee9
timer.c 4.23 KB