THRIFT-6120: Bound Ruby TLS accept handshakes#3669
Open
kpumuk wants to merge 1 commit into
Open
Conversation
kpumuk
marked this pull request as draft
July 24, 2026 02:10
kpumuk
force-pushed
the
rb-tls-accept-timeout
branch
from
July 24, 2026 03:10
8c67835 to
1f339e2
Compare
Client: rb Co-Authored-By: OpenAI Codex (GPT-5.6) <codex@openai.com>
kpumuk
force-pushed
the
rb-tls-accept-timeout
branch
from
July 26, 2026 02:29
1f339e2 to
f2256c7
Compare
kpumuk
marked this pull request as ready for review
July 26, 2026 02:50
Member
Author
|
Copilot, you are not helping. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SSLServerSocketpreviously applied its client timeout only after OpenSSL had completed the TLS handshake. A TCP peer that remained silent or stopped partway through negotiation could therefore keepacceptblocked beyond the configured timeout.This change separates TCP acceptance from TLS negotiation and drives the handshake nonblockingly against one monotonic deadline. Connections that time out, fail, or are interrupted before ownership transfers to the returned transport are closed. Successful connections continue to be returned as
Thrift::Socketinstances with the configured client timeout.NonblockingServerandThreadPoolServernow treat TLS handshake errors as recoverable accept failures, matching the existing behavior of the simple and threaded servers. The thread-pool server retries from the same worker instead of reporting the handshake failure as a worker exception. The optional OpenSSL check remains guarded so directly loaded plain-TCP server components preserve unrelated accept errors when OpenSSL has not been loaded.[skip ci]anywhere in the commit message to free up build resources.