Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
pepone committed Nov 19, 2024
1 parent 111ad2d commit 85eea5b
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions cpp/src/DataStorm/SessionI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -630,13 +630,6 @@ SessionI::retry(NodePrx node, exception_ptr exception)
{
lock_guard<mutex> lock(_mutex);

// Cancel any pending retry task, we are starting a new attempt.
if (_retryTask)
{
_instance->cancelTimerTask(_retryTask);
_retryTask = nullptr;
}

if (exception)
{
// Don't retry if we are shutting down.
Expand All @@ -657,6 +650,13 @@ SessionI::retry(NodePrx node, exception_ptr exception)
}
}

// Cancel any pending retry task, before we start a new one below.
if (_retryTask)
{
_instance->cancelTimerTask(_retryTask);
_retryTask = nullptr;
}

if (node->ice_getEndpoints().empty() && node->ice_getAdapterId().empty())
{
// We cannot retry because we don't have the peer endpoints. Wait twice the last retry interval for the peer to
Expand Down

0 comments on commit 85eea5b

Please sign in to comment.