Changeset 52b14142 for router


Ignore:
Timestamp:
May 2, 2019 2:59:16 PM (11 months ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
7aa68c0
Parents:
7f60ee9
Message:

Android: Catch ISE from PRNG at shutdown (ticket #2077)

Location:
router/java/src/net/i2p/router
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • router/java/src/net/i2p/router/RouterVersion.java

    r7f60ee9 r52b14142  
    1919    public final static String ID = "Monotone";
    2020    public final static String VERSION = CoreVersion.VERSION;
    21     public final static long BUILD = 11;
     21    public final static long BUILD = 12;
    2222
    2323    /** for example "-test" */
  • router/java/src/net/i2p/router/transport/crypto/DHSessionKeyBuilder.java

    r7f60ee9 r52b14142  
    488488
    489489        public void run() {
     490            try {
     491                run2();
     492            } catch (IllegalStateException ise) {
     493                if (_isRunning)
     494                    throw ise;
     495                // else ignore, thread can be slow to shutdown on Android,
     496                // PRNG gets stopped first and throws ISE
     497            }
     498        }
     499
     500        private void run2() {
    490501            _isRunning = true;
    491502            while (_isRunning) {
  • router/java/src/net/i2p/router/transport/crypto/X25519KeyFactory.java

    r7f60ee9 r52b14142  
    7878
    7979    public void run() {
     80        try {
     81            run2();
     82        } catch (IllegalStateException ise) {
     83            if (_isRunning)
     84                throw ise;
     85            // else ignore, thread can be slow to shutdown on Android,
     86            // PRNG gets stopped first and throws ISE
     87        }
     88    }
     89
     90    private void run2() {
    8091        _isRunning = true;
    8192        while (_isRunning) {
Note: See TracChangeset for help on using the changeset viewer.