Skip to content
  • Fabrice Bellet's avatar
    conncheck: wait for a pair until all stun requests are completed · 19c599a0
    Fabrice Bellet authored and Olivier Crête's avatar Olivier Crête committed
    Only the newest stun request may need to be retransmitted, according to
    the pair retransmit flag. This is the first element of the
    stun_transactions list. Older stun requests are just kept around until
    their timeout expires, without retransmission.
    
    The newest stun request is usually the last one that will timeout.
    Current code was based on that assumption, causing the pair to fail when
    the newest stun request timeout expires. This is not always true, and some
    older stun requests may have a greater timeout delay.
    
    So, we should wait until *all* stun requests of a given pair have
    reached their timeout.
    
    We also refactor this part of the code, to handle the first stun and the
    other stun requests in the same loop.
    19c599a0