forked from I2P_Developers/i2p.i2p
Console: Cheap workaround for old wrappers (ticket #1285)
This commit is contained in:
@ -72,15 +72,19 @@ public class ConfigServiceHandler extends FormHandler {
|
|||||||
ContextHelper.getContext(null).router().killKeys();
|
ContextHelper.getContext(null).router().killKeys();
|
||||||
if (_tellWrapper) {
|
if (_tellWrapper) {
|
||||||
int wait = WAIT;
|
int wait = WAIT;
|
||||||
Properties props = WrapperManager.getProperties();
|
// getProperties() not available on old wrappers,
|
||||||
String tmout = props.getProperty("wrapper.jvm_exit.timeout");
|
// TODO find out what version and test
|
||||||
if (tmout != null) {
|
try {
|
||||||
try {
|
Properties props = WrapperManager.getProperties();
|
||||||
int cwait = Integer.parseInt(tmout) * 1000;
|
String tmout = props.getProperty("wrapper.jvm_exit.timeout");
|
||||||
if (cwait > wait)
|
if (tmout != null) {
|
||||||
wait = cwait;
|
try {
|
||||||
} catch (NumberFormatException nfe) {}
|
int cwait = Integer.parseInt(tmout) * 1000;
|
||||||
}
|
if (cwait > wait)
|
||||||
|
wait = cwait;
|
||||||
|
} catch (NumberFormatException nfe) {}
|
||||||
|
}
|
||||||
|
} catch (Throwable t) {}
|
||||||
WrapperManager.signalStopping(wait);
|
WrapperManager.signalStopping(wait);
|
||||||
}
|
}
|
||||||
} catch (Throwable t) {
|
} catch (Throwable t) {
|
||||||
|
Reference in New Issue
Block a user