aboutsummaryrefslogtreecommitdiffstats
path: root/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java
diff options
context:
space:
mode:
Diffstat (limited to 'plugin/icedteanp/java/sun/applet/PluginAppletViewer.java')
-rw-r--r--plugin/icedteanp/java/sun/applet/PluginAppletViewer.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java b/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java
index 6017fa9..b901074 100644
--- a/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java
+++ b/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java
@@ -745,9 +745,18 @@ public class PluginAppletViewer extends XEmbeddedFrame
long maxTimeToSleep = APPLET_TIMEOUT;
panelLock.lock();
try {
- while (panel == null || !panel.isAlive())
+ while (panel == null || !panel.isAlive()) {
maxTimeToSleep -= waitTillTimeout(panelLock, panelLive,
maxTimeToSleep);
+
+ /* we already waited till timeout, give up here directly,
+ * instead of waiting 180s again in below waitForAppletInit()
+ */
+ if(maxTimeToSleep < 0) {
+ streamhandler.write("instance " + identifier + " reference " + -1 + " fatalError: " + "Initialization timed out");
+ return;
+ }
+ }
}
finally {
panelLock.unlock();