Skip to content
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

hyper client lifetime issue #7

Closed
jgraef opened this issue May 13, 2024 · 3 comments
Closed

hyper client lifetime issue #7

jgraef opened this issue May 13, 2024 · 3 comments
Labels

Comments

@jgraef
Copy link
Member

jgraef commented May 13, 2024

I had to remove an unnecessary 'static lifetime bound in hyper, so that we can mut-borrow connections to it. Currently the socks server needs this, because it wants to shut down the connections once the layer stack is done. But it is generally better not to require the connection to be static.

The workspace Cargo.toml contains a patch section to use my fix:

[patch.crates-io]
hyper = { git = "https://github.com/jgraef/hyper.git", branch = "non-static-client-io" }

Once the PR is merged upstream (and released), we can remove that patch.

@jgraef jgraef added the blocked label May 13, 2024
@jgraef
Copy link
Member Author

jgraef commented May 15, 2024

non-static IO might actually interfere with protocol upgrades. hyper can only create Upgraded for static IO, because the IO object is sent through an oneshot channel. I'm not sure how it compiles with non-static IO - and servers didn't require a static lifetime even before my patch.

@jgraef
Copy link
Member Author

jgraef commented May 21, 2024

I found more unnecessary and annoying trait/lifetime bounds and removed them. I didn't open a PR, but might later. For now we can just use the patch with my forked repo.

@jgraef
Copy link
Member Author

jgraef commented Jul 3, 2024

Changes have been merged into hyper.

@jgraef jgraef closed this as completed Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant