nifi-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [nifi-minifi-cpp] bakaid commented on a change in pull request #615: MINIFICPP-963 - Zero byte (no content) flow files cannot be received …
Date Mon, 02 Sep 2019 13:52:49 GMT
bakaid commented on a change in pull request #615: MINIFICPP-963 - Zero byte (no content) flow
files cannot be received …
URL: https://github.com/apache/nifi-minifi-cpp/pull/615#discussion_r319967401
 
 

 ##########
 File path: extensions/http-curl/sitetosite/HTTPProtocol.cpp
 ##########
 @@ -242,37 +241,39 @@ void HttpSiteToSiteClient::closeTransaction(const std::string &transactionID)
{
 
   if (it == known_transactions_.end()) {
     return;
-  } else {
-    transaction = it->second;
-    if (transaction->closed_) {
-      return;
-    }
+  }
+
+  transaction = it->second;
+  if (transaction->closed_) {
+    return;
   }
 
   std::string append_str;
-  logger_->log_info("Site to Site closed transaction %s", transaction->getUUIDStr());
+  logger_->log_trace("Site to Site closing transaction %s", transaction->getUUIDStr());
+
+
+  bool data_received = transaction->getDirection() == RECEIVE && (current_code
== CONFIRM_TRANSACTION || current_code == TRANSACTION_FINISHED);
 
   int code = UNRECOGNIZED_RESPONSE_CODE;
-  if (transaction->getState() == TRANSACTION_CONFIRMED) {
+  if (transaction->getState() == TRANSACTION_CONFIRMED || data_received) {
 
 Review comment:
   This code was not easy to understand so far, but it is now virtually unreadable. (I am
sure it is trivial, when you have the whole state machine and all the considerations of site-to-site
in your head, but otherwise its not so much.)
   Could you maybe add a few comments here about the underlying business logic this wants
to implement?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message