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-util: client connection pool won't clean expired connections after system sleep #3810

Open
DiscreteTom opened this issue Dec 13, 2024 · 1 comment
Labels
B-upstream Blocked: needs a change in a dependency or the compiler. C-bug Category: bug. Something is wrong. This is bad!

Comments

@DiscreteTom
Copy link

Version
hyper-util v0.1.10 (latest)

Platform
x86_64 GNU/Linux

Description
std::Instant has incorrect behavior after system sleep, see rust-lang/rust#79462

This will break some duration calculations, e.g. hyper-util client connection pool won't clean expired connections after system sleep because the new Instant::now is incorrect and the calculated duration is shorter than the actual one. See https://github.com/hyperium/hyper-util/blob/dce81a0cbae0dd989caab74b83be953e75c5cfb1/src/client/legacy/pool.rs#L760

Using https://github.com/DXist/boot-time/ or calling libc to get a time directly may solve this.

@DiscreteTom DiscreteTom added the C-bug Category: bug. Something is wrong. This is bad! label Dec 13, 2024
@seanmonstar seanmonstar added the B-upstream Blocked: needs a change in a dependency or the compiler. label Dec 13, 2024
@seanmonstar
Copy link
Member

Hm, that seems unfortunate. I know there's a couple issues opened in libstd, and there doesn't seem to be forward progress there, but I feel pretty strongly that's where it should be handled. It doesn't make sense to make all other crates use a 3rd-party type and have libstd's type be useless. Regardless of what libs-team members claim.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B-upstream Blocked: needs a change in a dependency or the compiler. C-bug Category: bug. Something is wrong. This is bad!
Projects
None yet
Development

No branches or pull requests

2 participants