szaszm commented on code in PR #1299:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1299#discussion_r847577043


##########
libminifi/src/c2/C2Agent.cpp:
##########
@@ -803,6 +789,7 @@ utils::TaskRescheduleInfo C2Agent::consume() {
       extractPayload(C2Payload{ Operation::HEARTBEAT });
     }
   }
+  if (restart_needed_) { request_restart_(); }

Review Comment:
   The restart happens here, after consuming all of the C2 commands. This 
`sem_post`s the `flow_controller_running` semaphore in `main`, which in turn 
calls `stop()` on the flow controller on the main thread, then reloads the 
config, recreates almost everything and restarts the agent, without restarting 
the process.



-- 
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