just a simple catch all for OOM while handling an OOM (naw, we dont recurse too much (just a little))
This commit is contained in:
@ -43,11 +43,16 @@ public class I2PThread extends Thread {
|
|||||||
try {
|
try {
|
||||||
super.run();
|
super.run();
|
||||||
} catch (Throwable t) {
|
} catch (Throwable t) {
|
||||||
|
try {
|
||||||
|
// we cant assume log is created
|
||||||
|
if (_log == null) _log = new Log(I2PThread.class);
|
||||||
|
_log.log(Log.CRIT, "Killing thread " + getName(), t);
|
||||||
|
} catch (Throwable woof) {
|
||||||
|
System.err.println("Died within the OOM itself");
|
||||||
|
t.printStackTrace();
|
||||||
|
}
|
||||||
if (t instanceof OutOfMemoryError)
|
if (t instanceof OutOfMemoryError)
|
||||||
fireOOM((OutOfMemoryError)t);
|
fireOOM((OutOfMemoryError)t);
|
||||||
// we cant assume log is created
|
|
||||||
if (_log == null) _log = new Log(I2PThread.class);
|
|
||||||
_log.log(Log.CRIT, "Killing thread " + getName(), t);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user