forked from I2P_Developers/i2p.i2p
Router: Don't check config files for reload on Android
This commit is contained in:
@ -67,10 +67,12 @@ abstract class LogWriterBase implements Runnable {
|
|||||||
|
|
||||||
public void run() {
|
public void run() {
|
||||||
_write = true;
|
_write = true;
|
||||||
|
// don't bother on Android
|
||||||
|
final boolean shouldReadConfig = !SystemVersion.isAndroid();
|
||||||
try {
|
try {
|
||||||
while (_write) {
|
while (_write) {
|
||||||
flushRecords();
|
flushRecords();
|
||||||
if (_write)
|
if (_write && shouldReadConfig)
|
||||||
rereadConfig();
|
rereadConfig();
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
@ -14,6 +14,7 @@ import net.i2p.router.RouterContext;
|
|||||||
import net.i2p.router.RouterClock;
|
import net.i2p.router.RouterClock;
|
||||||
import net.i2p.router.tasks.ReadConfigJob;
|
import net.i2p.router.tasks.ReadConfigJob;
|
||||||
import net.i2p.util.Log;
|
import net.i2p.util.Log;
|
||||||
|
import net.i2p.util.SystemVersion;
|
||||||
|
|
||||||
/** This actually boots almost everything */
|
/** This actually boots almost everything */
|
||||||
class BootCommSystemJob extends JobImpl {
|
class BootCommSystemJob extends JobImpl {
|
||||||
@ -46,9 +47,12 @@ class BootCommSystemJob extends JobImpl {
|
|||||||
// start I2CP
|
// start I2CP
|
||||||
getContext().jobQueue().addJob(new StartAcceptingClientsJob(getContext()));
|
getContext().jobQueue().addJob(new StartAcceptingClientsJob(getContext()));
|
||||||
|
|
||||||
Job j = new ReadConfigJob(getContext());
|
if (!SystemVersion.isAndroid()) {
|
||||||
j.getTiming().setStartAfter(getContext().clock().now() + 2*60*1000);
|
Job j = new ReadConfigJob(getContext());
|
||||||
getContext().jobQueue().addJob(j);
|
j.getTiming().setStartAfter(getContext().clock().now() + 2*60*1000);
|
||||||
|
getContext().jobQueue().addJob(j);
|
||||||
|
}
|
||||||
|
|
||||||
((RouterClock) getContext().clock()).addShiftListener(getContext().router());
|
((RouterClock) getContext().clock()).addShiftListener(getContext().router());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user