Changeset b41c5834


Ignore:
Timestamp:
Jul 8, 2011 7:03:38 PM (9 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
2eab528, 9d2816f4
Parents:
90b8aa7
Message:

another NPE from ticket 493

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • history.txt

    r90b8aa7 rb41c5834  
    112011-07-08 zzz
     2  * Findbugs: Several fixes and cleanups
    23  * I2NP: Consolidate common code from TunnelBuildMessage and
    34          TunnelBuildReplyMessage into a common base class
    4   * NetDB: Fix NPE at startup (ticket #493)
     5  * NetDB, TestJob: Fix NPEs at startup (ticket #493)
    56  * Sha256Standalone:
    67    - Use system SHA-256 MessageDigest instead of Sha256Standalone in PRNG
  • router/java/src/net/i2p/router/RouterVersion.java

    r90b8aa7 rb41c5834  
    1919    public final static String ID = "Monotone";
    2020    public final static String VERSION = CoreVersion.VERSION;
    21     public final static long BUILD = 7;
     21    public final static long BUILD = 8;
    2222
    2323    /** for example "-test" */
  • router/java/src/net/i2p/router/tunnel/pool/TestJob.java

    r90b8aa7 rb41c5834  
    2020import net.i2p.router.message.GarlicMessageBuilder;
    2121import net.i2p.router.message.PayloadGarlicConfig;
     22import net.i2p.stat.Rate;
     23import net.i2p.stat.RateStat;
    2224import net.i2p.util.Log;
    2325
     
    220222        // Try to prevent congestion collapse (failing all our tunnels and then clogging our outbound
    221223        // with new tunnel build requests) by adding in three times the average outbound delay.
    222         int delay = 3 * (int) getContext().statManager().getRate("transport.sendProcessingTime").getRate(60*1000).getAverageValue();
    223         return delay + (2500 * (_outTunnel.getLength() + _replyTunnel.getLength()));
     224        RateStat tspt = getContext().statManager().getRate("transport.sendProcessingTime");
     225        if (tspt != null) {
     226            Rate r = tspt.getRate(60*1000);
     227            if (r != null) {
     228                int delay = 3 * (int) r.getAverageValue();
     229                return delay + (2500 * (_outTunnel.getLength() + _replyTunnel.getLength()));
     230            }
     231        }
     232        return 15*1000;
    224233    }
    225234
Note: See TracChangeset for help on using the changeset viewer.