Merged
Conversation
keszybz
reviewed
Apr 15, 2026
Member
keszybz
left a comment
There was a problem hiding this comment.
Dunno, if this compiles, that it's probably OK. But with this level of abstraction I'm not sure if I grok all the implications.
| { | ||
| fn new(mut inner: L, acceptor: openssl::ssl::SslAcceptor) -> std::io::Result<Self> { | ||
| let local_addr = inner.local_addr()?; | ||
| let (tx, rx) = tokio::sync::mpsc::channel(256); |
Member
There was a problem hiding this comment.
I guess this could be defined as a constant somewhere at the top of the file…
The tls code is now logging the connectins in `connect_info()` just like PlainListener and the coming VsockListener. This way the code becomes more symmetrical.
Our TlsListener::new() code was syncronous - so slow clients could stall/block the server. This commit adds a new AsyncTlsListener that avoids this problem by using tokio::spawn() and a `mpsc` (multi-producer, single-consume) channel. This is very similar to the `tls-listener` crate but that does not implement the axum `serve::Listener` trait so using it is a bit cumbersome and its not much code that we add here.
d938c07 to
c409b48
Compare
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.
Our TlsListener::new() code was syncronous - so slow clients could stall/block the server. This commit adds a new AsyncTlsListener that avoids this problem by using tokio::spawn().
This is very similar to the
tls-listenercrate but that does not implement the axumserve::Listenertrait so using it is a bit cumbersome and its not much code that we add here (its a bit of a tradeoff, happy to hear opinions).