szaszm commented on a change in pull request #1218:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1218#discussion_r758582381



##########
File path: libminifi/src/io/tls/TLSSocket.cpp
##########
@@ -434,9 +434,9 @@ size_t TLSSocket::read(uint8_t *buf, size_t buflen) {
       const auto ssl_read_size = gsl::narrow<int>(std::min(buflen, 
gsl::narrow<size_t>(std::numeric_limits<int>::max())));
       status = SSL_read(fd_ssl, buf, ssl_read_size);
       sslStatus = SSL_get_error(fd_ssl, status);
-    } while (status < 0 && sslStatus == SSL_ERROR_WANT_READ);
+    } while (status <= 0 && sslStatus == SSL_ERROR_WANT_READ);

Review comment:
       Wouldn't this just keep us inside the inner loop while SSL_read returns 
0, which I assume happens when there is no more data available?




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