-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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 idle timeout does not work as expected #3640
Comments
Looks like I've updated the initial bug report to reflect this. |
Interesting. I can't remember why, maybe it was so a task wasn't started if the client never sent a request? Might be a simple fix, have you tried that modification? |
It looks like dropping |
Honestly, it might be reasonable to maintain the connection until response future is dropped. It may be just worth adding a small note to the docs, for posterity. In real applications, I don't expect response futures to stick around indefinitely. I'm happy to close the issue, if you deem this "working as designed". |
I also encountered the same problem. Once a request is initiated, the TCP connection will always exist and will not time out and close. |
Version
Latest hyper (1.3.1) & hyper-util (0.1.3)
Platform
Windows11
Description
The issue reproduces in a modified hyper-util client example:
Client is configured with idle timeout of 1 sec and the example performs several requests with 5 second delay.
The expectation is that a connection should be dropped from the pool after 1 second during each loop iteration. In practice, the connections start to get dropped only on the second iteration of the loop.
In a real application, this results in connections lingering until a new request is issued.
The text was updated successfully, but these errors were encountered: