change to while - issure refactoring

This commit is contained in:
Pearl Dsilva 2025-10-10 09:30:36 -04:00
parent 11cab28847
commit 78a4b9a9c8

View File

@ -368,7 +368,7 @@ public class VeeamClient {
protected void checkIfRestoreSessionFinished(String type, String path) throws IOException {
long startTime = System.currentTimeMillis();
long timeoutMs = restoreTimeout * 1000L;
if (System.currentTimeMillis() - startTime < timeoutMs) {
while (System.currentTimeMillis() - startTime < timeoutMs) {
HttpResponse relatedResponse = get(path);
RestoreSession session = parseRestoreSessionResponse(relatedResponse);
if (session.getResult().equals("Success")) {