martinzink commented on code in PR #1543:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1543#discussion_r1155849770
##########
libminifi/src/c2/C2Agent.cpp:
##########
@@ -180,17 +180,18 @@ void C2Agent::configure(const std::shared_ptr<Configure>
&configure, bool reconf
try {
if (auto heartbeat_period_ms =
utils::timeutils::StringToDuration<std::chrono::milliseconds>(heartbeat_period))
{
heart_beat_period_ = *heartbeat_period_ms;
- logger_->log_debug("Using %u ms as the heartbeat period",
heart_beat_period_.count());
} else {
heart_beat_period_ =
std::chrono::milliseconds(std::stoi(heartbeat_period));
}
} catch (const std::invalid_argument &) {
+ logger_->log_error("Invalid heartbeat period: %s", heartbeat_period);
heart_beat_period_ = 3s;
}
} else {
if (!reconfigure)
heart_beat_period_ = 3s;
}
+ logger_->log_debug("Using %u ms as the heartbeat period",
heart_beat_period_.count());
Review Comment:
nice catch, fixed it in
https://github.com/apache/nifi-minifi-cpp/pull/1543/commits/64c5975e3fda0911820465778fa4d73f16d12002#diff-6efb1f7ecfeb30f06ecb4dbda25c6ea4b7bde897b7a174253ed1c5331ec94ce7R194
--
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]