Skip to content

feat: added tls handshake timeout#178

Open
lucastemb wants to merge 1 commit into
rustls:mainfrom
lucastemb:lt/tls-timeout
Open

feat: added tls handshake timeout#178
lucastemb wants to merge 1 commit into
rustls:mainfrom
lucastemb:lt/tls-timeout

Conversation

@lucastemb

Copy link
Copy Markdown

Adds an optional client-side TLS handshake timeout to TlsConnector.

The timeout is configured with with_handshake_timeout(Some(Duration)) and applies only while the TLS handshake is pending. If the handshake does not complete before the deadline, the connect future returns an io::ErrorKind::TimedOut. FallibleConnect preserves its existing behavior of returning the underlying IO on failure.

A regression test covers an idle peer timing out during handshake.

Motivated by:

@cpu

cpu commented Jun 19, 2026

Copy link
Copy Markdown
Member

Thanks! This looked broadly good, but I had some review feedback (see the PR description in #182). Ultimately instead of suggesting edits here I decided to open a separate PR with my feedback folded into your original commit so I could see what this looks like if we draw the rest of the owl and add timeout support to the server-side pieces as follow-up commits. I think it makes sense to look at the whole thing at once, but if folks disagree we can also take (some of || all of) the fixup commits I made in 182, apply them here, land this PR, and then look at the server-side separately.

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.

2 participants