Skip to content

Commit

Permalink
Fix logic bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
abellgithub committed Oct 4, 2018
1 parent 5e91460 commit 540639b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/i3s/io/I3SReader.cpp
Expand Up @@ -86,15 +86,15 @@ std::vector<char> I3SReader::fetchBinary(std::string url,

// For the REST I3S endpoint there are no file extensions.
std::vector<char> result;
for (int i = 0; i < 5; ++i)
while (true)
{
auto data = m_arbiter->tryGetBinary(url + attNum);
if (data)
{
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));
}
Expand Down

0 comments on commit 540639b

Please sign in to comment.