Changeset b8f8c61


Ignore:
Timestamp:
Mar 17, 2015 1:17:38 PM (6 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
819b07a5
Parents:
25d1ae19
Message:

prevent negative sleep

File:
1 edited

Legend:

Unmodified
Added
Removed
  • router/java/src/net/i2p/router/transport/crypto/DHSessionKeyBuilder.java

    r25d1ae19 rb8f8c61  
    6565    private final static int DEFAULT_DH_PRECALC_MIN = 20;
    6666    private final static int DEFAULT_DH_PRECALC_MAX = 60;
    67     private final static int DEFAULT_DH_PRECALC_DELAY = 50;
     67    private final static int DEFAULT_DH_PRECALC_DELAY = 25;
    6868
    6969    /**
     
    506506                        // for some relief...
    507507                        try {
    508                             Thread.sleep(_calcDelay + (curCalc * 3));
     508                            Thread.sleep(Math.min(200, Math.max(10, _calcDelay + (curCalc * 3))));
    509509                        } catch (InterruptedException ie) { // nop
    510510                        }
Note: See TracChangeset for help on using the changeset viewer.