Github user jeking3 commented on a diff in the pull request: https://github.com/apache/thrift/pull/1476#discussion_r163663375 --- Diff: lib/cpp/src/thrift/transport/TSSLSocket.cpp --- @@ -249,6 +249,17 @@ TSSLSocket::~TSSLSocket() { close(); } +bool TSSLSocket::hasPendingDataToRead() { + if (!isOpen()) { + return false; + } + initializeHandshake(); + if (!checkHandshake()) + throw TSSLException("SSL_peek: Handshake is not completed"); --- End diff -- This should probably say something other than SSL_peek?
---