From e7913061e9168afddcd9bee6de4be43687ed1bdf Mon Sep 17 00:00:00 2001 From: zzz <zzz@mail.i2p> Date: Tue, 5 May 2009 21:04:46 +0000 Subject: [PATCH] * Console: More IE button fixes, try harder to not 404 the iframe --- apps/routerconsole/jsp/summaryframe.jsp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/apps/routerconsole/jsp/summaryframe.jsp b/apps/routerconsole/jsp/summaryframe.jsp index 627fe328c8..54126ef722 100644 --- a/apps/routerconsole/jsp/summaryframe.jsp +++ b/apps/routerconsole/jsp/summaryframe.jsp @@ -16,7 +16,9 @@ // try hard to avoid an error page in the iframe after shutdown String action = request.getParameter("action"); String d = request.getParameter("refresh"); - boolean shutdownSoon = "shutdownImmediate".equals(action) || "restartImmediate".equals(action); + // Normal browsers send value, IE sends button label + boolean shutdownSoon = "shutdownImmediate".equals(action) || "restartImmediate".equals(action) || + "Shutdown immediately".equals(action) || "Restart immediately".equals(action); if (!shutdownSoon) { if (d == null || "".equals(d)) { d = System.getProperty("routerconsole.summaryRefresh"); @@ -30,6 +32,14 @@ if (!"0".equals(d)) { // doesn't work for restart or shutdown with no expl. tunnels, // since the call to ConfigRestartBean.renderStatus() hasn't happened yet... + // So we delay slightly + if ("restart".equalsIgnoreCase(action) || "shutdown".equalsIgnoreCase(action)) { + synchronized(this) { + try { + wait(1000); + } catch(InterruptedException ie) {} + } + } long timeleft = net.i2p.router.web.ConfigRestartBean.getRestartTimeRemaining(); long delay = 60; try { delay = Long.parseLong(d); } catch (NumberFormatException nfe) {} -- GitLab