You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by pe...@apache.org on 2025/10/01 13:31:38 UTC
(cloudstack) 01/01: Veeam: Use restore timeout as a time interval as opposed to a counter
This is an automated email from the ASF dual-hosted git repository.
pearl11594 pushed a commit to branch veeam-counter-fix
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
commit e81a8d915e5bea858bbe2806d621d250ec85f505
Author: Pearl Dsilva <pe...@gmail.com>
AuthorDate: Wed Oct 1 09:31:27 2025 -0400
Veeam: Use restore timeout as a time interval as opposed to a counter
---
.../src/main/java/org/apache/cloudstack/backup/veeam/VeeamClient.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/plugins/backup/veeam/src/main/java/org/apache/cloudstack/backup/veeam/VeeamClient.java b/plugins/backup/veeam/src/main/java/org/apache/cloudstack/backup/veeam/VeeamClient.java
index e2df854f16d..dfaca90d305 100644
--- a/plugins/backup/veeam/src/main/java/org/apache/cloudstack/backup/veeam/VeeamClient.java
+++ b/plugins/backup/veeam/src/main/java/org/apache/cloudstack/backup/veeam/VeeamClient.java
@@ -366,7 +366,9 @@ public class VeeamClient {
* that is used to wait for the restore to complete before throwing a {@link CloudRuntimeException}.
*/
protected void checkIfRestoreSessionFinished(String type, String path) throws IOException {
- for (int j = 0; j < restoreTimeout; j++) {
+ long startTime = System.currentTimeMillis();
+ long timeoutMs = restoreTimeout * 1000L;
+ if (System.currentTimeMillis() - startTime < timeoutMs) {
HttpResponse relatedResponse = get(path);
RestoreSession session = parseRestoreSessionResponse(relatedResponse);
if (session.getResult().equals("Success")) {