We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cd12fa5 commit e81a8d9Copy full SHA for e81a8d9
1 file changed
plugins/backup/veeam/src/main/java/org/apache/cloudstack/backup/veeam/VeeamClient.java
@@ -366,7 +366,9 @@ private boolean checkTaskStatus(final HttpResponse response) throws IOException
366
* that is used to wait for the restore to complete before throwing a {@link CloudRuntimeException}.
367
*/
368
protected void checkIfRestoreSessionFinished(String type, String path) throws IOException {
369
- for (int j = 0; j < restoreTimeout; j++) {
+ long startTime = System.currentTimeMillis();
370
+ long timeoutMs = restoreTimeout * 1000L;
371
+ if (System.currentTimeMillis() - startTime < timeoutMs) {
372
HttpResponse relatedResponse = get(path);
373
RestoreSession session = parseRestoreSessionResponse(relatedResponse);
374
if (session.getResult().equals("Success")) {
0 commit comments