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
Question: redirects and timeouts? #271
Labels
support
Questions, discussions, and general support
Comments
This sounds like a bug in wreck. It should not perform additional retry requests after a timeout has been reported. |
kanongil
added a commit
to kanongil/wreck
that referenced
this issue
Jan 12, 2020
kanongil
added a commit
to kanongil/wreck
that referenced
this issue
Jan 12, 2020
kanongil
added a commit
to kanongil/wreck
that referenced
this issue
Jan 12, 2020
Thanks Gil - much appreciated! |
thx @kanongil ! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Support plan
Context
How can we help?
Hi all!
I use Wreck - with great joy - as my HTTP client for connecting to a third-party API. This API, however, uses
302
redirects and can also be quite slow. I've managed to configure Wreck to follow redirects. I also use atimeout
in case the API takes too much time and I want to stop the request.However, I don't fully understand how Wreck's redirects and timeouts work together. I want my request to fail if 5 redirects have occurred, or if 15 seconds have passed. I'm now confronted with a situation in which the initial request and 2 additional redirects occur in about 15 seconds. Wreck then rightfully throws a
504
error ("Client request timeout"). But after this, 3 more requests take place, probably because I've configured Wreck to make 5 redirects. I'd like the request as a whole to fail as soon as a timeout occurs, disregarding any remaining redirects. Is this possible?My test code:
This code logs the following steps:
beforeRedirect: http://localhost:{somePort}/
beforeRedirect: http://localhost:{somePort}/
Error: Client request timeout
beforeRedirect: http://localhost:{somePort}/
beforeRedirect: http://localhost:{somePort}/
beforeRedirect: http://localhost:{somePort}/
However, I would like the code to stop after step 3.
Help is much appreciated! :)
The text was updated successfully, but these errors were encountered: