Skip to content

Apply connect_timeout to TLS handshake#299

Open
bjosv wants to merge 2 commits intovalkey-io:mainfrom
bjosv:tls-connect-timeout
Open

Apply connect_timeout to TLS handshake#299
bjosv wants to merge 2 commits intovalkey-io:mainfrom
bjosv:tls-connect-timeout

Conversation

@bjosv
Copy link
Copy Markdown
Collaborator

@bjosv bjosv commented Mar 31, 2026

SSL_connect() blocks indefinitely when connecting with TLS to a non-TLS server.
Apply the connect_timeout as a socket timeout around the SSL_connect() call for blocking connections.

The combined TCP+TLS connect timeout can be longer than configured, but maybe its ok? It will not hang.

Related issues:
Nordix/hiredis-cluster#291
redis/hiredis#1177

SSL_connect() blocks indefinitely when connecting with TLS to a non-TLS server.
Apply the connect_timeout as a socket timeout around the SSL_connect() call for
blocking connections.

Signed-off-by: Björn Svensson <bjorn.a.svensson@est.tech>
@bjosv bjosv requested a review from michael-grunder March 31, 2026 12:28
Signed-off-by: Björn Svensson <bjorn.a.svensson@est.tech>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant