merge of '4347aa09448af24e7796c3282763d4a1bfc5c07f'

and '648083ff7dde91e5aa4416e1a9f85989acca9fb6'
This commit is contained in:
meeh
2019-05-02 22:43:41 +00:00
4 changed files with 24 additions and 1 deletions

View File

@ -1,4 +1,5 @@
2019-05-02 zzz
* Android: Catch ISE from PRNG at shutdown (ticket #2077)
* GeoIP Maxmind 2019-04-29
* NTCP: Rare EventPumper 100% CPU fix (ticket #2476)
* UPnP: Remove finalize() in HTTPSocket (ticket #2490)

View File

@ -18,7 +18,7 @@ public class RouterVersion {
/** deprecated */
public final static String ID = "Monotone";
public final static String VERSION = CoreVersion.VERSION;
public final static long BUILD = 11;
public final static long BUILD = 12;
/** for example "-test" */
public final static String EXTRA = "-rc";

View File

@ -487,6 +487,17 @@ public class DHSessionKeyBuilder {
}
public void run() {
try {
run2();
} catch (IllegalStateException ise) {
if (_isRunning)
throw ise;
// else ignore, thread can be slow to shutdown on Android,
// PRNG gets stopped first and throws ISE
}
}
private void run2() {
_isRunning = true;
while (_isRunning) {
//long start = System.currentTimeMillis();

View File

@ -77,6 +77,17 @@ public class X25519KeyFactory extends I2PThread {
}
public void run() {
try {
run2();
} catch (IllegalStateException ise) {
if (_isRunning)
throw ise;
// else ignore, thread can be slow to shutdown on Android,
// PRNG gets stopped first and throws ISE
}
}
private void run2() {
_isRunning = true;
while (_isRunning) {
int startSize = getSize();