You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2021/11/29 17:26:56 UTC

[GitHub] [nifi-minifi-cpp] szaszm commented on a change in pull request #1218: MINIFICPP-1693 - TLSSocket hangs when no more data is available

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: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org