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


##########
libminifi/src/c2/C2Agent.cpp:
##########
@@ -179,6 +200,17 @@ void C2Agent::configure(const std::shared_ptr<Configure> 
&configure, bool reconf
   }
   logger_->log_debug("Using {} as the heartbeat period", heart_beat_period_);
 
+  c2_connection_timeout_ = parseTimeoutPeriod(configuration_, 
std::string{Configuration::nifi_c2_connection_timeout}, logger_);
+  if (c2_connection_timeout_ && *c2_connection_timeout_ <= heart_beat_period_) 
{
+    logger_->log_warn(
+        "C2 connection timeout is less than the heartbeat period: c2 
connection timeout={}, heartbeat period={}. Adjusting it to be twice the "
+        "heartbeat period",
+        *c2_connection_timeout_,
+        heart_beat_period_);
+    c2_connection_timeout_ = heart_beat_period_ * 2;
+    logger_->log_debug("Using {} as the C2 connection timeout", 
*c2_connection_timeout_);
+  }

Review Comment:
   Makes sense, I updated it in 
https://github.com/apache/nifi-minifi-cpp/pull/2292/commits/6c3aea9cee887cb115528897f8304dad51a9a1b0



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