Skip to content

Commit

Permalink
don't restart subscriptions update timer if no subscription presented
Browse files Browse the repository at this point in the history
  • Loading branch information
orignal committed Jan 21, 2015
1 parent 276d509 commit 46a36f7
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions AddressBook.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -355,10 +355,13 @@ namespace client
void AddressBook::DownloadComplete (bool success)
{
m_IsDownloading = false;
m_SubscriptionsUpdateTimer->expires_from_now (boost::posix_time::minutes(
success ? CONTINIOUS_SUBSCRIPTION_UPDATE_TIMEOUT : CONTINIOUS_SUBSCRIPTION_RETRY_TIMEOUT));
m_SubscriptionsUpdateTimer->async_wait (std::bind (&AddressBook::HandleSubscriptionsUpdateTimer,
this, std::placeholders::_1));
if (m_SubscriptionsUpdateTimer)
{
m_SubscriptionsUpdateTimer->expires_from_now (boost::posix_time::minutes(
success ? CONTINIOUS_SUBSCRIPTION_UPDATE_TIMEOUT : CONTINIOUS_SUBSCRIPTION_RETRY_TIMEOUT));
m_SubscriptionsUpdateTimer->async_wait (std::bind (&AddressBook::HandleSubscriptionsUpdateTimer,
this, std::placeholders::_1));
}
}

void AddressBook::StartSubscriptions ()
Expand Down

0 comments on commit 46a36f7

Please sign in to comment.