bakaid commented on a change in pull request #550: MINIFICPP-822 - Nanofi raw 
S2S implementation shouldn't depend on any…
URL: https://github.com/apache/nifi-minifi-cpp/pull/550#discussion_r284216250
 
 

 ##########
 File path: libminifi/src/io/DescriptorStream.cpp
 ##########
 @@ -84,11 +84,10 @@ int DescriptorStream::readData(uint8_t *buf, int buflen) {
   if (!IsNullOrEmpty(buf)) {
     auto size_read = ::read(fd_, buf, buflen);
 
-    if (size_read != buflen) {
+    if (size_read < 0) {
 
 Review comment:
   This changes the behaviour of readData. I think it's better this way, but up 
till now callers could assume that this function either failed or filled the 
entire buffer. Have you reviewed all usages to make sure that they won't 
attempt to use the content of the entire buffer when it was only partially 
filled?

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