New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose option for setting TLS handshake timeout #2752
Conversation
This breaking API change would certainly not be ok to merge. It would need a new method adding. |
Thanks for the feedback @robjtede. I've made the following changes:
Longer term, it feels like this could use some refactoring. |
ad07d1d
to
fcba8a3
Compare
Would anyone be able to review this again? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haven't reviewed deeply but adding timeout config makes sense to me (if no one reviews for a few weeks, I'm going to do a more detailed review).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I reduced the API surface a bit and added relevant documentation but this approach is good to be added.
Thanks! |
PR Type
Feature
PR Checklist
Overview
Apologies for just raising this PR without any prior discussion. At present the TLS handshake timeout is hardcoded at 3 seconds internally in actix-tls. Having the ability to up this timeout is important for servers handling embedded clients that may take a while to do a handshake.
I'm attempting to expose the TLS handshake timeout as available on the Acceptor type in the actix-tls crate. The way I've done this is to add another option on the HttpServer if built with openssl or rustls. I'm very unfamiliar with the code, and I'm not particularily happy with the modification to the openssl/rustls-specific bits in actix-http (which is a bit incomplete missing the h1/h2 specific bits), which somewhat breaks the API, so I thought I'd just raise a draft PR as is to get the discussion going and get a better understanding on how you'd like this to be exposed.