Github user MartinHaimberger commented on a diff in the pull request:

    https://github.com/apache/thrift/pull/1363#discussion_r139311583
  
    --- Diff: lib/cpp/src/thrift/transport/TSSLSocket.cpp ---
    @@ -759,7 +775,9 @@ unsigned int TSSLSocket::waitForEvent(bool wantRead) {
       struct THRIFT_POLLFD fds[2];
       memset(fds, 0, sizeof(fds));
       fds[0].fd = fdSocket;
    -  fds[0].events = wantRead ? THRIFT_POLLIN : THRIFT_POLLOUT;
    +  // use POLLIN also on write operations too, this is needed for operations
    +  // which requires read and write on the socket.
    --- End diff --
    
    hi jeking3,
    
    the comment may not be perfect, but SSL operations, like SSL_connect or 
SSL_shutdown (where this function is also used) need to perform write and read 
operations on the socket and we dont know where we are so we need to listen on 
both socket events.
    
    I could also introduce a new function parameter for that.


---

Reply via email to