Provide a try_bind_with_graceful_shutdown method to TlsServer. #717
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.
Fixes #680
Side notes:
Into<SocketAddr> + 'static
rather than just anInto<SocketAddr>
, as well as returning aFuture<Output = ()> + 'static
rather than just aFuture<Output = ()>
. There are no tests to show a difference in behavior in terms of what contexts a static lifetime is warranted. Removing all forms of+ 'static
and we compile all tests and they all pass. Likewise with thesignal
parameters being+ Send + 'static
...this doesn't seem necessary because hyper's with_graceful_shutdown does not requireSend + 'static
semantics. Can we just remove all of these extra trait & lifetime bounds?try_bind
doesn't return aResult
but instead returns nothing and just does a tracing event. It should behave likebind
and calltry_bind_ephemeral
and return aResult<impl Future<Output = ()>, crate::Error>
Server::bind
say they return a Future but they don't, they wait on the future, but are anasync fn
and so technically they do return a future, but one that awaits on the inner server future. It's kind of a confusing interface to passersby that do not understand the distinction even though they are technically the same. Should we re-write these methods to be regular functions and return an explicitFuture
just to be consistent?