fgerlits commented on a change in pull request #1040:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1040#discussion_r605657624



##########
File path: extensions/standard-processors/processors/GetTCP.cpp
##########
@@ -130,7 +130,7 @@ void GetTCP::onSchedule(const 
std::shared_ptr<core::ProcessContext> &context, co
   }
 
   if (context->getProperty(StayConnected.getName(), value)) {
-    utils::StringUtils::StringToBool(value, stay_connected_);
+    stay_connected_ = utils::StringUtils::toBool(value).value_or(false);

Review comment:
       Ah yes, I can see we have `stay_connected_ = true;` earlier.  You're 
right, a good option would be to (move that assignment down to just before line 
132 and) remove the `else` branch.  [And also change the default to `true`.]




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

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


Reply via email to