Skip to content

Commit

Permalink
Use BeginStepPollingFrequencySecs in Open for polling time instead of…
Browse files Browse the repository at this point in the history
… calculating from OpenTimeoutSecs
  • Loading branch information
pnorbert committed Jul 29, 2020
1 parent 263d970 commit 876226d
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions source/adios2/engine/bp4/BP4Reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,17 +157,11 @@ void BP4Reader::Init()
const Seconds timeoutSeconds =
Seconds(m_BP4Deserializer.m_Parameters.OpenTimeoutSecs);

// set poll to 1/100 of timeout
Seconds pollSeconds = timeoutSeconds / 100.0;
static const auto pollSecondsMin = Seconds(1.0);
if (pollSeconds < pollSecondsMin)
{
pollSeconds = pollSecondsMin;
}
static const auto pollSecondsMax = Seconds(10.0);
if (pollSeconds > pollSecondsMax)
Seconds pollSeconds =
Seconds(m_BP4Deserializer.m_Parameters.BeginStepPollingFrequencySecs);
if (pollSeconds > timeoutSeconds)
{
pollSeconds = pollSecondsMax;
pollSeconds = timeoutSeconds;
}

TimePoint timeoutInstant =
Expand Down

0 comments on commit 876226d

Please sign in to comment.