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

 ##########
 File path: extensions/http-curl/sitetosite/HTTPProtocol.cpp
 ##########
 @@ -243,37 +242,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;
 
 Review comment:
   There were issues with this. 
   
   In case the RPG was acting as an input port and the remote side (NiFi) 
provided no flowfiles, the transaction finished without transferring data. This 
resulted in creating an invalid query here, flooding the logs with errors. 
   With this change these transactions are cancelled properly. 

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


With regards,
Apache Git Services

Reply via email to