Increase retry interval and count in ApplyUpdate.

Used when checking that node has shutdown and when replacing old JAR with new update.

ApplyUpdate previously waited 5 seconds between checks/retries, for up to 5 times: 25 seconds.
Now waits 10 seconds, for up to 12 times: 120 seconds.
Hopefully this will give slower nodes enough time to shut down and prevent errors like these on Windows installs:

2020-03-24 12:05:50 INFO  ApplyUpdate:114 - Unable to replace JAR: qortal.jar: The process cannot access the file because it is being used by another process.
This commit is contained in:
catbref 2020-03-26 12:38:08 +00:00
parent 6c8e96daae
commit bd87e6cc1a

View File

@ -36,8 +36,8 @@ public class ApplyUpdate {
private static final String NEW_JAR_FILENAME = AutoUpdate.NEW_JAR_FILENAME;
private static final String WINDOWS_EXE_LAUNCHER = "qortal.exe";
private static final long CHECK_INTERVAL = 5 * 1000L; // ms
private static final int MAX_ATTEMPTS = 5;
private static final long CHECK_INTERVAL = 10 * 1000L; // ms
private static final int MAX_ATTEMPTS = 12;
public static void main(String[] args) {
Security.insertProviderAt(new BouncyCastleProvider(), 0);