martinzink commented on a change in pull request #1225:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1225#discussion_r769563415



##########
File path: libminifi/src/RemoteProcessorGroupPort.cpp
##########
@@ -167,17 +167,12 @@ void RemoteProcessorGroupPort::onSchedule(const 
std::shared_ptr<core::ProcessCon
     }
   }
   {
-    uint64_t idleTimeoutVal = 15000;
-    std::string idleTimeoutStr;
-    if (!context->getProperty(idleTimeout.getName(), idleTimeoutStr)
-        || !core::Property::getTimeMSFromString(idleTimeoutStr, 
idleTimeoutVal)) {
-      logger_->log_debug("%s attribute is invalid, so default value of %s will 
be used", idleTimeout.getName(),
-                         idleTimeout.getValue());
-      if (!core::Property::getTimeMSFromString(idleTimeout.getValue(), 
idleTimeoutVal)) {
-        assert(false);  // Couldn't parse our default value
-      }
+    if (auto idle_timeout = 
context->getProperty<core::TimePeriodValue>(idleTimeout)) {
+      idle_timeout_ = idle_timeout->getMilliseconds();
+    } else {
+      logger_->log_debug("%s attribute is invalid, so default value of %s will 
be used", idleTimeout.getName(), idleTimeout.getDefaultValue());
+      idle_timeout_ = 
static_cast<core::TimePeriodValue>(idleTimeout.getDefaultValue().to_string()).getMilliseconds();

Review comment:
       you are right, I think it was due to copy paste but yeah entirely 
unneccesary removed it in 
https://github.com/apache/nifi-minifi-cpp/pull/1225/commits/78f8658fde802c73a5965dd734a544acbc37dca3
 
https://github.com/martinzink/nifi-minifi-cpp/commit/78f8658fde802c73a5965dd734a544acbc37dca3#diff-11bc2ef16726b961c333f05cf658ab5a88b7331722598d5d0921029e3cc47f89R174




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