[
https://issues.apache.org/jira/browse/THRIFT-4559?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Sidney Borne updated THRIFT-4559:
---------------------------------
Environment: Ubuntu Linux 16.04 with Thrift 0.11.0 and libssl-dev 1.0.2g
(was: Ubuntu Linux 16.04 with Thrift 0.11.0)
> TSSLServerSocket incorrectly prints errors
> ------------------------------------------
>
> Key: THRIFT-4559
> URL: https://issues.apache.org/jira/browse/THRIFT-4559
> Project: Thrift
> Issue Type: Bug
> Components: C++ - Library
> Affects Versions: 0.11.0
> Environment: Ubuntu Linux 16.04 with Thrift 0.11.0 and libssl-dev
> 1.0.2g
> Reporter: Sidney Borne
> Priority: Minor
> Labels: easyfix, newbie, patch
> Attachments: 0001-maybe-fixes-things.patch
>
>
> Tested on both 0.11.0 and master.
>
> C++ Server, Python Client. SSL sockets. SSL works correctly and communication
> is successful, however when the client disconnects the server always prints
> the following message:
> {{Thrift: Tue Apr 17 15:43:36 2018 TConnectedClient died: SSL_read: error
> code: 0 (SSL_error_code = 5)}}
>
> Deeper diving shows that SSL_error_code 5 is SSL_ERROR_SYSCALL. Documentation
> says to check both errno and the SLL error stack, however upon inspection
> both return 0 (no error). I believe this message is printed incorrectly.
>
> Upon inspecting the code for handing SSL_read, it appears that reading is
> done in a while-loop, which if no error is found is broken out of. At some
> point a switch-case was added, but the single level of break statements
> remained, leaving non-errors to break out of the switch instead of the while.
>
> A potential fix can be seen here:
> https://github.com/Sidneys1/thrift/commit/9d3c2b26e18a3e6f0a787446ea4e1c7d7381e2b6
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)