Changeset 5941a52


Ignore:
Timestamp:
Jul 30, 2013 10:10:02 PM (7 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
f3affff
Parents:
04e6beb
Message:
  • Tunnels: Extend local expiration of IB tunnels, to allow for more clock skew and not drop valid messages at their destination
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • history.txt

    r04e6beb r5941a52  
     12012-07-30 zzz
     2 * i2psnark: Increase max piece size to 4 MB (ticket #993)
     3 * Tunnels: Extend local expiration of IB tunnels, to allow for
     4   more clock skew and not drop valid messages at their destination
     5
    162012-07-29 zzz
    27 * Signatures:
  • router/java/src/net/i2p/router/RouterVersion.java

    r04e6beb r5941a52  
    1919    public final static String ID = "Monotone";
    2020    public final static String VERSION = CoreVersion.VERSION;
    21     public final static long BUILD = 15;
     21    public final static long BUILD = 16;
    2222
    2323    /** for example "-test" */
  • router/java/src/net/i2p/router/tunnel/pool/ExpireJob.java

    r04e6beb r5941a52  
    3030        // Also skew the inbound away from the outbound
    3131        long expire = cfg.getExpiration();
    32         _dropAfter = expire + Router.CLOCK_FUDGE_FACTOR;
    33         if (_pool.getSettings().isInbound())
     32        if (_pool.getSettings().isInbound()) {
     33            // wait extra long for IB so we don't drop msgs that
     34            // got all the way to us.
     35            _dropAfter = expire + (2 * Router.CLOCK_FUDGE_FACTOR);
    3436            expire -= IB_EARLY_EXPIRE + ctx.random().nextLong(IB_EARLY_EXPIRE);
    35         else
     37        } else {
     38            _dropAfter = expire + Router.CLOCK_FUDGE_FACTOR;
    3639            expire -= OB_EARLY_EXPIRE + ctx.random().nextLong(OB_EARLY_EXPIRE);
     40        }
    3741        // See comments in TunnelPool.locked_buildNewLeaseSet
    3842        cfg.setExpiration(expire);
     
    4650    public void runJob() {
    4751        if (!_leaseUpdated) {
     52            // First run
    4853            _pool.removeTunnel(_cfg);
    4954            _leaseUpdated = true;
     
    5358            requeue(timeToDrop);
    5459        } else {
     60            // Second run
    5561            // already removed/refreshed, but now lets make it
    5662            // so we dont even honor the tunnel anymore
Note: See TracChangeset for help on using the changeset viewer.