File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
plugins/backup/veeam/src/main/java/org/apache/cloudstack/backup/veeam Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -366,7 +366,9 @@ private boolean checkTaskStatus(final HttpResponse response) throws IOException
366366 * that is used to wait for the restore to complete before throwing a {@link CloudRuntimeException}.
367367 */
368368 protected void checkIfRestoreSessionFinished (String type , String path ) throws IOException {
369- for (int j = 0 ; j < restoreTimeout ; j ++) {
369+ long startTime = System .currentTimeMillis ();
370+ long timeoutMs = restoreTimeout * 1000L ;
371+ if (System .currentTimeMillis () - startTime < timeoutMs ) {
370372 HttpResponse relatedResponse = get (path );
371373 RestoreSession session = parseRestoreSessionResponse (relatedResponse );
372374 if (session .getResult ().equals ("Success" )) {
You can’t perform that action at this time.
0 commit comments