[ 
https://issues.apache.org/jira/browse/THRIFT-4331?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16167724#comment-16167724
 ] 

ASF GitHub Bot commented on THRIFT-4331:
----------------------------------------

GitHub user MartinHaimberger opened a pull request:

    https://github.com/apache/thrift/pull/1363

    THRIFT-4331 - C++: TSSLSocket fixes

    fixed issue with large messages, where waitForEvent was called
    mutliple times waiting for SSL_read() to get bytes and running
    in the retry timeout.
    
    fixed issue where poll was not using the right flags.
    
    Fixes issue THRIFT-4331 on master.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/MartinHaimberger/thrift master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/thrift/pull/1363.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1363
    
----
commit 3e6e271dedbbb46f1a45f5e5d0b56bddf1589764
Author: Martin Haimberger <martin.haimber...@thincast.com>
Date:   2017-09-15T11:03:27Z

    C++: TSSLSocket fixes
    
    fixed issue with large messages, where waitForEvent was called
    mutliple times waiting for SSL_read() to get bytes and running
    in the retry timeout.
    
    fixed issue where poll was not using the right flags.

----


> C++: TSSLSockets bug in handling huge messages, bug in handling polling
> -----------------------------------------------------------------------
>
>                 Key: THRIFT-4331
>                 URL: https://issues.apache.org/jira/browse/THRIFT-4331
>             Project: Thrift
>          Issue Type: Bug
>          Components: C++ - Library
>    Affects Versions: 0.10.0, 1.0
>            Reporter: Martin Haimberger
>             Fix For: 0.10.0, 1.0
>
>         Attachments: 0.10.0-THRIFT-4331.patch, master-THRIFT-4331.patch
>
>
> The TSSLSocket class did not handle large messages, because a underlying TCP 
> socket my signal bytes received, while SSL_read() may not have bytes 
> available. After maxretries (5) the function returned -1, which got 
> interpreted as unsigned integer for read bytes.
> Futher the waitForEvent methode, did only set THRIFT_POLLIN or 
> THRIFT_POLLOUT, but it gets used where SSL needs to send AND receive bytes 
> for some operations (like close). So in the case of write wanted, 
> THRIFT_POLLIN is also set to cover these read/write operations.
> Pullrequest for master and 0.10.0 branch will follow.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to