diff options
Diffstat (limited to 'src/components/policy/policy_regular/src')
-rw-r--r-- | src/components/policy/policy_regular/src/policy_manager_impl.cc | 10 |
1 files changed, 8 insertions, 2 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 39b303cbb5..3e08147a4c 100644 --- a/src/components/policy/policy_regular/src/policy_manager_impl.cc +++ b/src/components/policy/policy_regular/src/policy_manager_impl.cc @@ -196,7 +196,10 @@ bool PolicyManagerImpl::LoadPT(const std::string& file, utils::SharedPtr<policy_table::Table> policy_table_snapshot = cache_->GenerateSnapshot(); if (!policy_table_snapshot) { - LOG4CXX_ERROR(logger_, "Failed to create snapshot of policy table"); + LOG4CXX_ERROR( + logger_, + "Failed to create snapshot of policy table, trying another exchange"); + ForcePTExchange(); return false; } @@ -209,7 +212,10 @@ bool PolicyManagerImpl::LoadPT(const std::string& file, // Replace current data with updated if (!cache_->ApplyUpdate(*pt_update)) { - LOG4CXX_WARN(logger_, "Unsuccessful save of updated policy table."); + LOG4CXX_WARN( + logger_, + "Unsuccessful save of updated policy table, trying another exchange"); + ForcePTExchange(); return false; } |