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

customer provided timeout not respected during tcp connect phase #46

Closed
KarthikNedunchezhiyan opened this issue Feb 9, 2021 · 1 comment · Fixed by #47
Closed

customer provided timeout not respected during tcp connect phase #46

KarthikNedunchezhiyan opened this issue Feb 9, 2021 · 1 comment · Fixed by #47

Comments

@KarthikNedunchezhiyan
Copy link
Contributor

KarthikNedunchezhiyan commented Feb 9, 2021

Issue

Request may take a long time than a configured timeout or even hang because TCP connect phase has no timeout.

TcpStream::connect(&self.request.host).map_err(Error::from)

Steps to reproduce

minreq::Request::new(Method::Get, "http://54.158.248.248:91").with_timeout(1000).send();

Above code will hang for a long time even though we have configured timeout for 1sec.

@neonmoe Happy to work on resolving this once you confirm that this is actually an issue.

@neonmoe
Copy link
Owner

neonmoe commented Feb 9, 2021

So it seems, as there is a TcpStream::connect_timeout to cover that case. If you want to work on this, feel free!

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

Successfully merging a pull request may close this issue.

2 participants