lordgamez commented on code in PR #1324:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1324#discussion_r871040486


##########
libminifi/src/c2/C2Agent.cpp:
##########
@@ -627,19 +628,21 @@ void C2Agent::handlePropertyUpdate(const 
C2ContentResponse &resp) {
     changeUpdateState(update_property(entry.first, entry.second.to_string(), 
lifetime));
   }
   // apply changes and persist properties requested to be persisted
-  if (result != state::UpdateState::NO_OPERATION && 
!configuration_->commitChanges()) {
+  auto propertyWasUpdated = [&](){ return result == 
state::UpdateState::FULLY_APPLIED || result == 
state::UpdateState::PARTIALLY_APPLIED; };

Review Comment:
   That's true, but I wasn't sure if changing it to a bool would be error-prone 
in the future if result calculation changes before we check for the need for a 
restart. But I suppose we can keep an eye on that and we have a test for the 
restart requests.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to