From 540639b05d6b9ad59bddb33a963bb14fd97ddd53 Mon Sep 17 00:00:00 2001 From: Andrew Bell Date: Thu, 4 Oct 2018 10:15:56 -0400 Subject: [PATCH] Fix logic bug. --- plugins/i3s/io/I3SReader.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/i3s/io/I3SReader.cpp b/plugins/i3s/io/I3SReader.cpp index 6ef9006025..9d572152b4 100644 --- a/plugins/i3s/io/I3SReader.cpp +++ b/plugins/i3s/io/I3SReader.cpp @@ -86,7 +86,7 @@ std::vector I3SReader::fetchBinary(std::string url, // For the REST I3S endpoint there are no file extensions. std::vector result; - for (int i = 0; i < 5; ++i) + while (true) { auto data = m_arbiter->tryGetBinary(url + attNum); if (data) @@ -94,7 +94,7 @@ std::vector I3SReader::fetchBinary(std::string url, result = std::move(*data); break; } - if (++i == NumRetries) + if (++retry == NumRetries) throwError(std::string("Failed to fetch: " + url + attNum)); std::this_thread::sleep_for(std::chrono::milliseconds(250)); }