http3 make request future sync
Should fix #2322 .
Requires new h3-quinn release and https://github.com/hyperium/h3/pull/249 to be merged.
I removed the http3 specific Resolver trait. Was there a reason for a second one?
I am not familiar with this code base, so please make sure the additional Sync bounds do not break something.
CI is currently failing. At the moment it does not compile with hickory-dns feature enabled.
I check with the master branch and with the hickory-dns the response future is also not Sync
Should this also work with hickory-dns? or just with http3? I took a quick look at hickory-dns. As far as I understood the crate it is probably not trivial to make their types Sync.
I cannot say when I will continue on this PR. If someone wants to continue, feel free to do so.
@Ruben2424 were you planning to continue the PR anytime soon? I think wrapping the async block with sync_wrapper would work in this case:
// src/dns/hickory.rs
Box::pin(sync_wrapper::SyncFuture::new(async move {
let resolver = resolver.state.get_or_try_init(new_resolver)?;
let lookup = resolver.lookup_ip(name.as_str()).await?;
let addrs: Addrs = Box::new(SocketAddrs {
iter: lookup.into_iter(),
});
Ok(addrs)
}))
@Ruben2424 were you planning to continue the PR anytime soon?
No
This was done in #2685.