Ignore:
Timestamp:
Feb 18, 2011, 12:24:04 AM (11 years ago)
Author:
jch
Message:

Check for UTP timeouts every 50ms or so.

Greg says that works for them.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/tr-utp.c

    r11904 r11905  
    3434#include "peer-mgr.h"
    3535#include "tr-utp.h"
     36
     37/* Greg says 50ms works for them. */
     38
     39#define UTP_INTERVAL_US 50000
    3640
    3741static struct event *utp_timer = NULL;
     
    8387{
    8488    UTP_CheckTimeouts();
    85     tr_timerAdd(utp_timer, 1, tr_cryptoWeakRandInt(1000000));
     89    tr_timerAdd(utp_timer, 0,
     90                UTP_INTERVAL_US / 2 + tr_cryptoWeakRandInt(UTP_INTERVAL_US));
    8691}
    8792
     
    96101            return -1;
    97102        evtimer_set(utp_timer, timer_callback, NULL);
    98         tr_timerAdd(utp_timer, 1, tr_cryptoWeakRandInt(1000000));
     103        tr_timerAdd(utp_timer, 0,
     104                    UTP_INTERVAL_US / 2 + tr_cryptoWeakRandInt(UTP_INTERVAL_US));
    99105    }
    100106
Note: See TracChangeset for help on using the changeset viewer.