diff options
author | Alexander Kutsan <alexkutsan@ya.ru> | 2017-01-16 21:22:17 +0200 |
---|---|---|
committer | Alexander Kutsan <alexkutsan@ya.ru> | 2017-01-16 21:28:55 +0200 |
commit | ab5542c22979e4fe2ce86db2d0c7bd4cca949cff (patch) | |
tree | 2f54ded2167ca20627017978b5499dfec67e3995 /src/components/policy/policy_regular/src/policy_manager_impl.cc | |
parent | 787736fe317125e77d9a422c86169c17e1d3a678 (diff) | |
download | sdl_core-ab5542c22979e4fe2ce86db2d0c7bd4cca949cff.tar.gz |
Avoid using miliseconds for retry sequence timeout
Related issue : APPLINK-31433
Diffstat (limited to 'src/components/policy/policy_regular/src/policy_manager_impl.cc')
-rw-r--r-- | src/components/policy/policy_regular/src/policy_manager_impl.cc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/components/policy/policy_regular/src/policy_manager_impl.cc b/src/components/policy/policy_regular/src/policy_manager_impl.cc index ac82c9ebcb..65a7c42f90 100644 --- a/src/components/policy/policy_regular/src/policy_manager_impl.cc +++ b/src/components/policy/policy_regular/src/policy_manager_impl.cc @@ -58,7 +58,8 @@ void DeleteManager(policy::PolicyManager* pm) { } namespace { -const uint32_t kDefaultRetryTimeoutInMSec = 60u * date_time::DateTime::MILLISECONDS_IN_SECOND; +const uint32_t kDefaultRetryTimeoutInMSec = + 60u * date_time::DateTime::MILLISECONDS_IN_SECOND; } // namespace namespace policy { @@ -311,7 +312,9 @@ void PolicyManagerImpl::StartPTExchange() { if (update_status_manager_.IsUpdateRequired()) { if (RequestPTUpdate() && !timer_retry_sequence_.is_running()) { // Start retry sequency - timer_retry_sequence_.Start(NextRetryTimeout(), timer::kPeriodic); + const int t = NextRetryTimeout(); + LOG4CXX_DEBUG(logger_, "Start retry sequence timeout = " << t); + timer_retry_sequence_.Start(t, timer::kPeriodic); } } } @@ -780,7 +783,7 @@ uint32_t PolicyManagerImpl::NextRetryTimeout() { } // Return miliseconds - return next * date_time::DateTime::MILLISECONDS_IN_SECOND; + return next; } void PolicyManagerImpl::RefreshRetrySequence() { @@ -1005,10 +1008,11 @@ void PolicyManagerImpl::RetrySequence() { uint32_t timeout = NextRetryTimeout(); if (!timeout && timer_retry_sequence_.is_running()) { + LOG4CXX_DEBUG(logger_, "AKutsan Stop timer " << timeout); timer_retry_sequence_.Stop(); return; } - + LOG4CXX_DEBUG(logger_, "AKutsan start " << timeout); timer_retry_sequence_.Start(timeout, timer::kPeriodic); } |