add config timeout_verify
- remove hardcoded 60 seconds timeout during verify, as with pack200 this may fail on slow systems - introduce new config "timeout_verify" with 60 seconds default - handle timeout with aborting the launch
This commit is contained in:
@@ -747,6 +747,7 @@ public class Application
|
|||||||
_dockName = config.getString("ui.name");
|
_dockName = config.getString("ui.name");
|
||||||
_dockIconPath = config.getString("ui.mac_dock_icon", "../desktop.icns");
|
_dockIconPath = config.getString("ui.mac_dock_icon", "../desktop.icns");
|
||||||
|
|
||||||
|
_timeoutVerify = config.getInt("timeout_verify", 60);
|
||||||
return config;
|
return config;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1312,7 +1313,10 @@ public class Application
|
|||||||
while (completed[0] < rsrcs.size()) {
|
while (completed[0] < rsrcs.size()) {
|
||||||
// we should be getting progress completion updates WAY more often than one every
|
// we should be getting progress completion updates WAY more often than one every
|
||||||
// minute, so if things freeze up for 60 seconds, abandon ship
|
// minute, so if things freeze up for 60 seconds, abandon ship
|
||||||
Runnable action = actions.poll(60, TimeUnit.SECONDS);
|
Runnable action = actions.poll(_timeoutVerify, TimeUnit.SECONDS);
|
||||||
|
if (action == null) {
|
||||||
|
throw new IllegalStateException("m.timeout_verify");
|
||||||
|
}
|
||||||
action.run();
|
action.run();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1753,6 +1757,8 @@ public class Application
|
|||||||
protected List<Resource> _codes = new ArrayList<>();
|
protected List<Resource> _codes = new ArrayList<>();
|
||||||
protected List<Resource> _resources = new ArrayList<>();
|
protected List<Resource> _resources = new ArrayList<>();
|
||||||
|
|
||||||
|
protected int _timeoutVerify = 60;
|
||||||
|
|
||||||
protected boolean _useCodeCache;
|
protected boolean _useCodeCache;
|
||||||
protected int _codeCacheRetentionDays;
|
protected int _codeCacheRetentionDays;
|
||||||
|
|
||||||
|
|||||||
@@ -101,6 +101,8 @@ m.another_getdown_running = Multiple instances of this application's \
|
|||||||
|
|
||||||
m.applet_stopped = Getdown's applet was told to stop working.
|
m.applet_stopped = Getdown's applet was told to stop working.
|
||||||
|
|
||||||
|
m.timeout_verify = Timeout verifying resources
|
||||||
|
|
||||||
# application/digest errors
|
# application/digest errors
|
||||||
m.missing_appbase = The configuration file is missing the 'appbase'.
|
m.missing_appbase = The configuration file is missing the 'appbase'.
|
||||||
m.invalid_version = The configuration file specifies an invalid version.
|
m.invalid_version = The configuration file specifies an invalid version.
|
||||||
|
|||||||
@@ -105,6 +105,7 @@ Vorgang erledigen lassen.
|
|||||||
|
|
||||||
m.applet_stopped = Die Anwendung wurde beendet.
|
m.applet_stopped = Die Anwendung wurde beendet.
|
||||||
|
|
||||||
|
m.timeout_verify = Timeout beim Verifizieren der Resourcen
|
||||||
|
|
||||||
# application/digest errors
|
# application/digest errors
|
||||||
m.missing_appbase = In der Konfigurationsdatei fehlt die 'appbase'.
|
m.missing_appbase = In der Konfigurationsdatei fehlt die 'appbase'.
|
||||||
|
|||||||
Reference in New Issue
Block a user