Console: Cheap workaround for old wrappers (ticket #1285)

This commit is contained in:
zzz
2014-05-18 23:24:03 +00:00
parent d1bd893a7b
commit 4167cd955b

View File

@ -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) {