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

Specify timeout for client requests? #417

Closed
jimmycuadra opened this issue Apr 1, 2015 · 4 comments
Closed

Specify timeout for client requests? #417

jimmycuadra opened this issue Apr 1, 2015 · 4 comments

Comments

@jimmycuadra
Copy link

A few times while integration testing a library I'm building with Hyper, the test runner has hung infinitely due to what I assume is an HTTP request that's never timing out. Is it possible to specify a timeout for a request? Should the default be infinite, as it seems to be?

IIRC there isn't an implementation of network timeouts in std, which might explain the current behavior. Any tips on debugging a request that hangs to figure out what it's doing?

@Ryman
Copy link
Contributor

Ryman commented Apr 1, 2015

Could be related to #368

@seanmonstar
Copy link
Member

Yep, the removal of timeouts from std means we don't have an easy way to do this. cc #315

@jimmycuadra as for debugging, you could set up a logger (such as env_logger, or log4rs). With env_logger, you could use RUST_LOG=hyper to get the full firehose of logs.

@adimarco
Copy link

adimarco commented Jan 4, 2016

@jimmycuadra Did you ever figure this out? And/or was this related to integration testing with Rusoto? I'm seeing the same behavior there.

@jimmycuadra
Copy link
Author

I believe I came across this when working on either rust-fleet or rust-etcd, and eventually figured out what was wrong with my connection settings using the logger.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants